home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 016a / dmake38.zip / DMAKE.NC < prev    next >
Text File  |  1992-01-25  |  123KB  |  3,201 lines

  1.  
  2.  
  3.  
  4.  
  5. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  6.  
  7.  
  8.  
  9. NAME
  10.      dmake - maintain program groups, or interdependent files
  11.  
  12. SYNOPSIS
  13.      dmake [-ABceEhiknpqrsStTuVx] [-v{dfimt}] [-P#] [-{f|C|K}
  14.      file] [macro[*][+][:]=value ...] [target ...]
  15.  
  16. DESCRIPTION
  17.      dmake executes commands found in an external file called a
  18.      makefile to update one or more target names.  Each target
  19.      may depend on zero or more prerequisite targets.  If any of
  20.      the target's prerequisites is newer than the target or if
  21.      the target itself does not exist, then dmake will attempt to
  22.      make the target.
  23.  
  24.      If no -f command line option is present then dmake searches
  25.      for an existing makefile from the list of prerequisites
  26.      specified for the special target .MAKEFILES (see the STARTUP
  27.      section for more details).  If "-" is the name of the file
  28.      specified to the -f flag then dmake uses standard input as
  29.      the source of the makefile text.
  30.  
  31.      Any macro definitions (arguments with embedded "=" signs)
  32.      that appear on the command line are processed first and
  33.      supersede definitions for macros of the same name found
  34.      within the makefile.  In general it is impossible for defin-
  35.      itions found inside the makefile to redefine a macro defined
  36.      on the command line, see the MACROS section for an excep-
  37.      tion.
  38.  
  39.      If no target names are specified on the command line, then
  40.      dmake uses the first non-special target found in the
  41.      makefile as the default target.  See the SPECIAL TARGETS
  42.      section for the list of special targets and their function.
  43.      dmake is a re-implementation of the UNIX Make utility with
  44.      significant enhancements.  Makefiles written for most previ-
  45.      ous versions of Make will be handled correctly by dmake.
  46.      Known differences between dmake and other versions of make
  47.      are discussed in the COMPATIBILITY section found at the end
  48.      of this document.
  49.  
  50. OPTIONS
  51.      -A   Enable AUGMAKE special inference rule transformations
  52.           (see the "PERCENT(%) RULES" section), these are set to
  53.           off by default.
  54.  
  55.      -B   Enable the use of spaces instead of <tabs> to begin
  56.           recipe lines.  This flag equivalent to the .NOTABS spe-
  57.           cial macro and is further described below.
  58.  
  59.      -c   Use non-standard comment stripping.  If you specify -c
  60.           then dmake will treat any # character as a start of
  61.  
  62.  
  63.  
  64. Version 3.70                    UW                              1
  65.  
  66.  
  67.  
  68.  
  69. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  70.  
  71.  
  72.  
  73.           comment character wherever it may appear unless it is
  74.           escaped by a \.
  75.  
  76.      -C [+]file
  77.           This option writes to file a copy of standard output
  78.           and standard error from any child processes and from
  79.           the dmake process itself.  If you specify a + prior to
  80.           the file name then the text is appended to the previous
  81.           contents of file.  This option is active in the MSDOS
  82.           implementation only and is ignored by non-MSDOS ver-
  83.           sions of dmake.
  84.  
  85.      -E   Read the environment and define all strings of the form
  86.           'ENV-VAR=evalue' defined within as macros whose name is
  87.           ENV-VAR, and whose value is 'evalue'.  The environment
  88.           is processed prior to processing the user specified
  89.           makefile thereby allowing definitions in the makefile
  90.           to override definitions in the environment.
  91.  
  92.      -e   Same as -E, except that the environment is processed
  93.           after the user specified makefile has been processed
  94.           (thus definitions in the environment override defini-
  95.           tions in the makefile).  The -e and -E options are
  96.           mutually exclusive.  If both are given the latter takes
  97.           effect.
  98.  
  99.      -f file
  100.           Use file as the source for the makefile text.  Only one
  101.           -f option is allowed.
  102.  
  103.      -h   Print the command summary for dmake.
  104.  
  105.      -i   Tells dmake to ignore errors, and continue making other
  106.           targets.  This is equivalent to the .IGNORE attribute
  107.           or macro.
  108.  
  109.      -K file
  110.           Turns on .KEEP_STATE state tracking and tells dmake to
  111.           use file as the state file.
  112.  
  113.      -k   Causes dmake to ignore errors caused by command execu-
  114.           tion and to make all targets not depending on targets
  115.           that could not be made. Ordinarily dmake stops after a
  116.           command returns a non-zero status, specifying -k causes
  117.           dmake to ignore the error and continue to make as much
  118.           as possible.
  119.  
  120.      -n   Causes dmake to print out what it would have executed,
  121.           but does not actually execute the commands.  A special
  122.           check is made for the string "$(MAKE)" inside a recipe
  123.           line, if found, the line is expanded and invoked,
  124.           thereby enabling recursive makes to give a full
  125.  
  126.  
  127.  
  128. Version 3.70                    UW                              2
  129.  
  130.  
  131.  
  132.  
  133. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  134.  
  135.  
  136.  
  137.           description of all that they will do.  The check for
  138.           "$(MAKE)" is disabled inside group recipes.
  139.  
  140.      -p   Print out a version of the digested makefile in human
  141.           readable form.  (useful for debugging, but cannot be
  142.           re-read by dmake)
  143.  
  144.      -P#  On systems that support multi-processing cause dmake to
  145.           use # concurrent child processes to make targets.  See
  146.           the "MULTI PROCESSING" section for more information.
  147.  
  148.      -q   Check and see if the target is up to date.  Exits with
  149.           code 0 if up to date, 1 otherwise.
  150.  
  151.      -r   Tells dmake not to read the initial startup makefile,
  152.           see STARTUP section for more details.
  153.  
  154.      -s   Tells dmake to do all its work silently and not echo
  155.           the commands it is executing to stdout (also suppresses
  156.           warnings).  This  is equivalent to the .SILENT attri-
  157.           bute or macro.
  158.  
  159.      -S   Force sequential execution of recipes on architectures
  160.           which support concurrent makes.  For backward compati-
  161.           bility with old makefiles that have nasty side-effect
  162.           prerequisite dependencies.
  163.  
  164.      -t   Causes dmake to touch the targets and bring them up to
  165.           date without executing any commands.  Note that targets
  166.           will not be created if they do not already exist.
  167.  
  168.      -T   Tells dmake to not perform transitive closure on the
  169.           inference graph.
  170.  
  171.      -u   Force an unconditional update.  (ie. do everything that
  172.           would be done if everything that a target depended on
  173.           was out of date)
  174.  
  175.      -v[dfimt]
  176.           Verbose flag, when making targets print to stdout what
  177.           we are going to make and what we think its time stamp
  178.           is.  The optional flags [dfimt] can be used to restrict
  179.           the information that is displayed.  In the absence of
  180.           any optional flags all are assumed to be given (ie. -v
  181.           is equivalent to -vdfimt).  The meanings of the
  182.           optional flags are:
  183.  
  184.           d    Notify of change directory operations only.
  185.  
  186.           f    Notify of file I/O operations only.
  187.  
  188.  
  189.  
  190.  
  191.  
  192. Version 3.70                    UW                              3
  193.  
  194.  
  195.  
  196.  
  197. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  198.  
  199.  
  200.  
  201.           i    Notify of inference algorithm operation only.
  202.  
  203.           m    Notify of target update operations only.
  204.  
  205.           t    Keep any temporary files created; normally they
  206.                are automatically deleted.
  207.  
  208.      -V   Print the version of dmake, and values of builtin mac-
  209.           ros.
  210.  
  211.      -x   Upon processing the user makefile export all non-
  212.           internally defined macros to the user's environment.
  213.           This option together with the -e option allows SYSV
  214.           AUGMAKE recursive makes to function as expected.
  215.  
  216. INDEX
  217.      Here is a list of the sections that follow and a short
  218.      description of each.  Perhaps you won't have to read the
  219.      whole man page to find what you need.
  220.  
  221.      STARTUP            Describes dmake initialization.
  222.  
  223.      SYNTAX             Describes the syntax of makefile expres-
  224.                         sions.
  225.  
  226.      ATTRIBUTES         Describes the notion of attributes and
  227.                         how they are used when making targets.
  228.  
  229.      MACROS             Defining and expanding macros.
  230.  
  231.      RULES AND TARGETS  How to define targets and their prere-
  232.                         quisites.
  233.  
  234.      RECIPES            How to tell dmake how to make a target.
  235.  
  236.      TEXT DIVERSIONS    How to use text diversions in recipes and
  237.                         macro expansions.
  238.  
  239.      SPECIAL TARGETS    Some targets are special.
  240.  
  241.      SPECIAL MACROS     Macros used by dmake to alter the pro-
  242.                         cessing of the makefile, and those
  243.                         defined by dmake for the user.
  244.  
  245.      CONTROL MACROS     Itemized list of special control macros.
  246.  
  247.      RUN-TIME MACROS    Discussion of special run-time macros
  248.                         such as $@ and $<.
  249.  
  250.      FUNCTION MACROS    GNU style function macros, only $(mktmp
  251.                         ...) for now.
  252.  
  253.  
  254.  
  255.  
  256. Version 3.70                    UW                              4
  257.  
  258.  
  259.  
  260.  
  261. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  262.  
  263.  
  264.  
  265.      DYNAMIC PREREQUISITES
  266.                         Processing of prerequisites which contain
  267.                         macro expansions in their name.
  268.  
  269.      BINDING TARGETS    The rules that dmake uses to bind a tar-
  270.                         get to an existing file in the file sys-
  271.                         tem.
  272.  
  273.      PERCENT(%) RULES   Specification of recipes to be used by
  274.                         the inference algorithm.
  275.  
  276.      MAKING INFERENCES  The rules that dmake uses when inferring
  277.                         how to make a target which has no expli-
  278.                         cit recipe.  This and the previous sec-
  279.                         tion are really a single section in the
  280.                         text.
  281.  
  282.      MAKING TARGETS     How dmake makes targets other than
  283.                         libraries.
  284.  
  285.      MAKING LIBRARIES   How dmake makes libraries.
  286.  
  287.      KEEP STATE         A discussion of how .KEEP_STATE works.
  288.  
  289.      MULTI PROCESSING   Discussion of dmake's parallel make
  290.                         facilities for architectures that support
  291.                         them.
  292.  
  293.      CONDITIONALS       Conditional expressions which control the
  294.                         processing of the makefile.
  295.  
  296.      EXAMPLES           Some hopefully useful examples.
  297.  
  298.      COMPATIBILITY      How dmake compares with previous versions
  299.                         of make.
  300.  
  301.      LIMITS             Limitations of dmake.
  302.  
  303.      PORTABILITY        Comments on writing portable makefiles.
  304.  
  305.      FILES              Files used by dmake.
  306.  
  307.      SEE ALSO           Other related programs, and man pages.
  308.  
  309.      AUTHOR             The guy responsible for this thing.
  310.  
  311.      BUGS               Hope not.
  312.  
  313. STARTUP
  314.      When dmake begins execution it first processes the command
  315.      line and then processes an initial startup-makefile.  This
  316.      is followed by an attempt to locate and process a user
  317.  
  318.  
  319.  
  320. Version 3.70                    UW                              5
  321.  
  322.  
  323.  
  324.  
  325. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  326.  
  327.  
  328.  
  329.      supplied makefile.  The startup file defines the default
  330.      values of all required control macros and the set of default
  331.      rules for making targets and inferences.  When searching for
  332.      the startup makefile, dmake searches the following loca-
  333.      tions, in the order specified, until a startup file is
  334.      located:
  335.  
  336.           1.   The location given as the value of the macro MAK-
  337.                ESTARTUP defined on the command line.
  338.  
  339.           2.   The location given as the value of the environment
  340.                variable MAKESTARTUP defined in the current
  341.                environment.
  342.  
  343.           3.   The location given as the value of the macro MAK-
  344.                ESTARTUP defined internally within dmake.
  345.  
  346.      The above search is disabled by specifying the -r option on
  347.      the command line.  An error is issued if a startup makefile
  348.      cannot be found and the -r option was not specified.  A user
  349.      may substitute a custom startup file by defining the MAKES-
  350.      TARTUP environment variable or by redefining the MAKESTARTUP
  351.      macro on the command line.  To determine where dmake looks
  352.      for the default startup file, check your environment or
  353.      issue the command "dmake -V".
  354.  
  355.      A similar search is performed to locate a default user
  356.      makefile when no -f command line option is specified.  By
  357.      default, the prerequisite list of the special target
  358.      .MAKEFILES specifies the names of possible makefiles and the
  359.      search order that dmake should use to determine if one
  360.      exists.  A typical definition for this target is:
  361.  
  362.           .MAKEFILES : makefile.mk Makefile makefile
  363.  
  364.      dmake will first look for makefile.mk and then the others.
  365.      If a prerequisite cannot be found dmake will try to make it
  366.      before going on to the next prerequisite.  For example,
  367.      makefile.mk can be checked out of an RCS file if the proper
  368.      rules for doing so are defined in the startup file.
  369.  
  370.      If the first line of the user makefile is of the form:
  371.  
  372.           #! command command_args
  373.  
  374.      then dmake will expand and run the command prior to reading
  375.      any addtional input.  If the return code of the command is
  376.      zero then dmake will continue on to process the remainder of
  377.      the user makefile, if the return code is non-zero then dmake
  378.      will exit.
  379.  
  380.  
  381.  
  382.  
  383.  
  384. Version 3.70                    UW                              6
  385.  
  386.  
  387.  
  388.  
  389. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  390.  
  391.  
  392.  
  393. SYNTAX
  394.      This section is a summary of the syntax of makefile state-
  395.      ments.  The description is given in a style similar to BNF,
  396.      where { } enclose items that may appear zero or more times,
  397.      and [ ] enclose items that are optional.  Alternative pro-
  398.      ductions for a left hand side are indicated by '->', and
  399.      newlines are significant.  All symbols in bold type are text
  400.      or names representing text supplied by the user.
  401.  
  402.  
  403.  
  404.           Makefile -> { Statement }
  405.  
  406.           Statement -> Macro-Definition
  407.                     -> Conditional
  408.                     -> Rule-Definition
  409.                     -> Attribute-Definition
  410.  
  411.           Macro-Definition -> MACRO = LINE
  412.                            -> MACRO *= LINE
  413.                            -> MACRO := LINE
  414.                            -> MACRO *:= LINE
  415.                            -> MACRO += LINE
  416.                            -> MACRO +:= LINE
  417.  
  418.           Conditional ->  .IF expression
  419.                              Makefile
  420.                           [ .ELIF expression
  421.                              Makefile ]
  422.                           [ .ELSE
  423.                              Makefile ]
  424.                           .END
  425.  
  426.           expression -> LINE
  427.                      -> STRING == LINE
  428.                      -> STRING != LINE
  429.  
  430.  
  431.           Rule-Definition ->  target-definition
  432.                                  [ recipe ]
  433.  
  434.           target-definition -> targets [attrs] op { PREREQUISITE } [; rcp-line]
  435.  
  436.           targets -> target { targets }
  437.                   -> "target" { targets }
  438.  
  439.           target -> special-target
  440.                  -> TARGET
  441.  
  442.           attrs -> attribute { attrs }
  443.                 -> "attribute" { attrs }
  444.  
  445.  
  446.  
  447.  
  448. Version 3.70                    UW                              7
  449.  
  450.  
  451.  
  452.  
  453. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  454.  
  455.  
  456.  
  457.           op -> : { modifier }
  458.  
  459.           modifier -> :
  460.                    -> ^
  461.                    -> !
  462.                    -> -
  463.  
  464.           recipe -> { TAB rcp-line }
  465.                  -> [@][%][-] [
  466.                        { LINE }
  467.                     ]
  468.  
  469.           rcp-line -> [@][%][-][+] LINE
  470.  
  471.  
  472.           Attribute-Definition -> attrs : targets
  473.  
  474.  
  475.           attribute -> .EPILOG
  476.                     -> .IGNORE
  477.                     -> .LIBRARY
  478.                     -> .MKSARGS
  479.                     -> .NOINFER
  480.                     -> .NOSTATE
  481.                     -> .PHONY
  482.                     -> .PRECIOUS
  483.                     -> .PROLOG
  484.                     -> .SETDIR=path
  485.                     -> .SILENT
  486.                     -> .SEQUENTIAL
  487.                     -> .SWAP
  488.                     -> .USESHELL
  489.                     -> .SYMBOL
  490.                     -> .UPDATEALL
  491.  
  492.           special-target -> .ERROR
  493.                          -> .EXPORT
  494.                          -> .GROUPEPILOG
  495.                          -> .GROUPPROLOG
  496.                          -> .IMPORT
  497.                          -> .INCLUDE
  498.                          -> .INCLUDEDIRS
  499.                          -> .MAKEFILES
  500.                          -> .REMOVE
  501.                          -> .SOURCE
  502.                          -> .SOURCE.suffix
  503.                          -> .suffix1.suffix2
  504.  
  505.  
  506.      Where, TAB represents a <tab> character, STRING represents
  507.      an arbitrary sequence of characters, and LINE represents a
  508.      possibly empty sequence of characters terminated by a non-
  509.  
  510.  
  511.  
  512. Version 3.70                    UW                              8
  513.  
  514.  
  515.  
  516.  
  517. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  518.  
  519.  
  520.  
  521.      escaped (not immediately preceded by a backslash '\') new-
  522.      line character.  MACRO, PREREQUISITE, and TARGET each
  523.      represent a string of characters not including space or tab
  524.      which respectively form the name of a macro, prerequisite or
  525.      target.  The name may itself be a macro expansion expres-
  526.      sion.  A LINE can be continued over several physical lines
  527.      by terminating it with a single backslash character.  Com-
  528.      ments are initiated by the pound # character and extend to
  529.      the end of line.  All comment text is discarded, a '#' may
  530.      be placed into the makefile text by escaping it with '\'
  531.      (ie. \# translates to # when it is parsed).  An exception to
  532.      this occurs when a # is seen inside a recipe line that
  533.      begins with a <tab> or is inside a group recipe.  If you
  534.      specify the -c command line switch then this behavior is
  535.      disabled and dmake will treat all # characters as start of
  536.      comment indicators unless they are escaped by \.  A set of
  537.      continued lines may be commented out by placing a single #
  538.      at the start of the first line.  A continued line cannot
  539.      span more than one makefile.
  540.  
  541.      white space is defined to be any combination of <space>,
  542.      <tab>, and the sequence \<nl> when \<nl> is used to ter-
  543.      minate a LINE.  When processing macro definition lines, any
  544.      amount of white space is allowed on either side of the macro
  545.      operator (=, *=, :=, *:=, += or +:=), and white space is
  546.      stripped from both before and after the macro value string.
  547.      The sequence \<nl> is treated as white space during recipe
  548.      expansion and is deleted from the final recipe string.  You
  549.      must escape the \<nl> with another \ in order to get a \ at
  550.      the end of a recipe line.  The \<nl> sequence is deleted
  551.      from macro values when they are expanded.
  552.  
  553.      When processing target definition lines, the recipe for a
  554.      target must, in general, follow the first definition of the
  555.      target (See the RULES AND TARGETS section for an exception),
  556.      and the recipe may not span across multiple makefiles.  Any
  557.      targets and prerequisites found on a target definition line
  558.      are taken to be white space separated tokens.  The rule
  559.      operator (op in SYNTAX section) is also considered to be a
  560.      token but does not require white space to precede or follow
  561.      it.  Since the rule operator begins with a `:', traditional
  562.      versions of make do not allow the `:' character to form a
  563.      valid target name.  dmake allows `:' to be present in
  564.      target/prerequisite names as long as the entire
  565.      target/prerequisite name is quoted.  For example:
  566.  
  567.           a:fred : test
  568.  
  569.      would be parsed as TARGET = a, PREREQUISITES={fred, :,
  570.      test}, which is not what was intended.  To fix this you must
  571.      write:
  572.  
  573.  
  574.  
  575.  
  576. Version 3.70                    UW                              9
  577.  
  578.  
  579.  
  580.  
  581. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  582.  
  583.  
  584.  
  585.           "a:fred" : test
  586.  
  587.      Which will be parsed as expected.  Quoted target and prere-
  588.      quisite specifications may also contain white space thereby
  589.      allowing the use of complex function macro expressions..
  590.      See the EXAMPLES section for how to apply " quoting to a
  591.      list of targets.
  592.  
  593. ATTRIBUTES
  594.      dmake defines several target attributes.  Attributes may be
  595.      assigned to a single target, a group of targets, or to all
  596.      targets in the makefile.  Attributes are used to modify
  597.      dmake actions during target update.  The recognized attri-
  598.      butes are:
  599.  
  600.  
  601.      .EPILOG     Insert shell epilog code when executing a group
  602.                  recipe associated with any target having this
  603.                  attribute set.
  604.  
  605.      .IGNORE     Ignore an error when trying to make any target
  606.                  with this attribute set.
  607.  
  608.      .LIBRARY    Target is a library.
  609.  
  610.      .MKSARGS    If running in an MSDOS environment then use MKS
  611.                  extended argument passing conventions to pass
  612.                  arguments to commands.  Non-MSDOS environments
  613.                  ignore this attribute.
  614.  
  615.      .NOINFER    Any target with this attribute set will not be
  616.                  subjected to transitive closure if it is
  617.                  inferred as a prerequisite of a target whose
  618.                  recipe and prerequisites are being inferred.
  619.                  (i.e. the inference algorithm will not use any
  620.                  prerequisite with this attribute set, as a tar-
  621.                  get) If specified as '.NOINFER:' (ie. with no
  622.                  prerequisites or targets) then the effect is
  623.                  equivalent to specifying -T on the command line.
  624.  
  625.      .NOSTATE    Any target with this attribute set will not have
  626.                  command line flag information stored in the
  627.                  state file if .KEEP_STATE has been enabled.
  628.  
  629.      .PHONY      Any target with this attribute set will have its
  630.                  recipe executed each time the target is made
  631.                  even if a file matching the target name can be
  632.                  located.  Any targets that have a .PHONY attri-
  633.                  buted target as a prerequisite will be made each
  634.                  time the .PHONY attributed prerequisite is made.
  635.  
  636.  
  637.  
  638.  
  639.  
  640. Version 3.70                    UW                             10
  641.  
  642.  
  643.  
  644.  
  645. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  646.  
  647.  
  648.  
  649.      .PRECIOUS   Do not remove associated target under any cir-
  650.                  cumstances.  Set by default for any targets
  651.                  whose corresponding files exist in the file sys-
  652.                  tem prior to the execution of dmake.
  653.  
  654.      .PROLOG     Insert shell prolog code when executing a group
  655.                  recipe associated with any target having this
  656.                  attribute set.
  657.  
  658.      .SEQUENTIAL Force a sequential make of the associated
  659.                  target's prerequisites.
  660.  
  661.      .SETDIR     Change current working directory to specified
  662.                  directory when making the associated target.
  663.                  You must specify the directory at the time the
  664.                  attribute is specified.  To do this simply give
  665.                  .SETDIR=path as the attribute.  path is expanded
  666.                  and the result is used as the value of the
  667.                  directory to change to.  If path is surrounded
  668.                  by single quotes then path is not expanded, and
  669.                  is used literally as the directory name.  If the
  670.                  path contains any `:' characters then the entire
  671.                  attribute string must be quoted using ".  If a
  672.                  target having this attribute set also has the
  673.                  .IGNORE attribute set then if the change to the
  674.                  specified directory fails it will be ignored,
  675.                  and no error message will be issued.
  676.  
  677.      .SILENT     Do not echo the recipe lines when making any
  678.                  target with this attribute set, and do not issue
  679.                  any warnings.
  680.  
  681.      .SWAP       Under MSDOS when making a target with this
  682.                  attribute set swap the dmake executable to disk
  683.                  prior to executing the recipe line.  Also see
  684.                  the '%' recipe line flag defined in the RECIPES
  685.                  section.
  686.  
  687.      .SYMBOL     Target is a library member and is an entry point
  688.                  into a module in the library.  This attribute is
  689.                  used only when searching a library for a target.
  690.                  Targets of the form lib((entry)) have this
  691.                  attribute set automatically.
  692.  
  693.      .USESHELL   Force each recipe line of a target to be exe-
  694.                  cuted using a shell.  Specifying this attribute
  695.                  is equivalent to specifying the '+' character at
  696.                  the start of each line of a non-group recipe.
  697.  
  698.      .UPDATEALL  Indicates that all the targets listed in this
  699.                  rule are updated by the execution of the accom-
  700.                  panying recipe.  A common example is the
  701.  
  702.  
  703.  
  704. Version 3.70                    UW                             11
  705.  
  706.  
  707.  
  708.  
  709. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  710.  
  711.  
  712.  
  713.                  production of the y.tab.c and y.tab.h files by
  714.                  yacc when it is run on a grammar.  Specifying
  715.                  .UPDATEALL in such a rule prevents the running
  716.                  of yacc twice, once for the y.tab.c file and
  717.                  once for the y.tab.h file.
  718.  
  719.  
  720.      All attributes are user setable and except for .UPDATEALL,
  721.      .SETDIR and .MKSARGS may be used in one of two forms.  The
  722.      .MKSARGS attribute is restricted to use as a global attri-
  723.      bute, and the use of the .UPDATEALL and .SETDIR attributes
  724.      is restricted to rules of the second form only.
  725.  
  726.           ATTRIBUTE_LIST : targets
  727.  
  728.      assigns the attributes specified by ATTRIBUTE_LIST to each
  729.      target in targets or
  730.  
  731.           targets ATTRIBUTE_LIST : ...
  732.  
  733.      assigns the attributes specified by ATTRIBUTE_LIST to each
  734.      target in targets. In the first form if targets is empty
  735.      (ie. a NULL list), then the list of attributes will apply to
  736.      all targets in the makefile (this is equivalent to the com-
  737.      mon Make construct of ".IGNORE :" but has been modified to
  738.      the notion of an attribute instead of a special target).
  739.      Not all of the attributes have global meaning.  In particu-
  740.      lar, .LIBRARY, .NOSTATE, .PHONY, .SETDIR, .SYMBOL and
  741.      .UPDATEALL have no assigned global meaning.
  742.  
  743.      Any attribute may be used with any target, even with the
  744.      special targets.  Some combinations are useless (e.g.
  745.      .INCLUDE .PRECIOUS: ... ), while others are useful (e.g.
  746.      .INCLUDE .IGNORE : "file.mk" will not complain if file.mk
  747.      cannot be found using the include file search rules, see the
  748.      section on SPECIAL TARGETS for a description of .INCLUDE).
  749.      If a specified attribute will not be used with the special
  750.      target a warning is issued and the attribute is ignored.
  751.  
  752. MACROS
  753.      dmake supports six types of macro assignment.
  754.  
  755.  
  756.      MACRO = LINE    This is the most common and familiar form of
  757.                      macro assignment.  It assigns LINE literally
  758.                      as the value of MACRO.  Future expansions of
  759.                      MACRO recursively expand its value.
  760.  
  761.      MACRO *= LINE   This form behaves exactly as the simple '='
  762.                      form with the exception that if MACRO
  763.                      already has a value then the assignment is
  764.                      not performed.
  765.  
  766.  
  767.  
  768. Version 3.70                    UW                             12
  769.  
  770.  
  771.  
  772.  
  773. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  774.  
  775.  
  776.  
  777.      MACRO := LINE   This form differs from the simple '=' form
  778.                      in that it expands LINE prior to assigning
  779.                      it as the value of MACRO.  Future expansions
  780.                      of MACRO do not recursively expand its
  781.                      value.
  782.  
  783.      MACRO *:= LINE  This form behaves exactly as the ':=' form
  784.                      with the exception that if MACRO already has
  785.                      a value then the assignment and expansion
  786.                      are not performed.
  787.  
  788.      MACRO += LINE   This form of macro assignment allows macro
  789.                      values to grow.  It takes the literal value
  790.                      of LINE and appends it to the previous value
  791.                      of MACRO separating the two by a single
  792.                      space.  Future expansions of MACRO recur-
  793.                      sively expand its value.
  794.  
  795.      MACRO +:= LINE  This form is similar to the '+=' form except
  796.                      that the value of LINE is expanded prior to
  797.                      being added to the value of MACRO.
  798.  
  799.      Macro expressions specified on the command line allow the
  800.      macro value to be redefined within the makefile only if the
  801.      macro is defined using the '+=' and '+:=' operators.  Other
  802.      operators will define a macro that cannot be further modi-
  803.      fied.
  804.  
  805.      When dmake defines a non-environment macro it strips leading
  806.      and trailing white space from the macro value.  Macros
  807.      imported from the environment via either the .IMPORT special
  808.      target (see the SPECIAL TARGETS section), or the -e, or -E
  809.      flags are an exception to this rule.  Their values are
  810.      always taken literally and white space is never stripped.
  811.      In addition, named macros defined using the .IMPORT special
  812.      target do not have their values expanded when they are used
  813.      within a makefile.  In contrast, environment macros that are
  814.      imported due to the specification of the -e or -E flags are
  815.      subject to expansion when used.
  816.  
  817.      To specify a macro expansion enclose the name in () or {}
  818.      and precede it with a dollar sign $.  Thus $(TEST)
  819.      represents an expansion of the macro variable named TEST.
  820.      If TEST is defined then $(TEST) is replaced by its expanded
  821.      value.  If TEST is not defined then $(TEST) expands to the
  822.      NULL string (this is equivalent to defining a macro as
  823.      'TEST=' ).  A short form may be used for single character
  824.      named macros.  In this case the parentheses are optional,
  825.      and $(I) is equivalent to $I.  Macro expansion is recursive,
  826.      hence, if the value string contains an expression represent-
  827.      ing a macro expansion, the expansion is performed.  Circular
  828.      macro expansions are detected and cause an error to be
  829.  
  830.  
  831.  
  832. Version 3.70                    UW                             13
  833.  
  834.  
  835.  
  836.  
  837. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  838.  
  839.  
  840.  
  841.      issued.
  842.  
  843.      When defining a macro the given macro name is first expanded
  844.      before being used to define the macro.  Thus it is possible
  845.      to define macros whose names depend on values of other mac-
  846.      ros.  For example, suppose CWD is defined as
  847.  
  848.           CWD = $(PWD:b)
  849.  
  850.      then the value of $(CWD) is the name of the current direc-
  851.      tory.  This can be used to define macros specific to this
  852.      directory, for example:
  853.  
  854.           _$(CWD).prt = list of files to print...
  855.  
  856.      The actual name of the defined macro is a function of the
  857.      current directory.  A construct such as this is useful when
  858.      processing a hierarchy of directories using .SETDIR attri-
  859.      buted targets and a collection of small distributed makefile
  860.      stubs.
  861.  
  862.      Macro variables may be defined within the makefile, on the
  863.      command line, or imported from the environment.
  864.  
  865.      dmake supports several non-standard macro expansions: The
  866.      first is of the form:
  867.  
  868.           $(macro_name:modifier_list:modifier_list:...)
  869.  
  870.      where modifier_list is chosen from the set { D or d, F or f,
  871.      B or b, S or s, T or t } and
  872.  
  873.           d - directory portion of all path names
  874.           f - file (including suffix) portion of path names
  875.           b - file (not including suffix) portion of path names
  876.           s - simple pattern substitution
  877.           t - tokenization.
  878.  
  879.      Thus if we have the example:
  880.  
  881.           test = d1/d2/d3/a.out f.out d1/k.out
  882.  
  883.      The following macro expansions produce the values on the
  884.      right of '->' after expansion.
  885.  
  886.           $(test:d)            -> d1/d2/d3/ d1/
  887.           $(test:b)            -> a f k
  888.           $(test:f)            -> a.out f.out k.out
  889.           ${test:db}           -> d1/d2/d3/a f d1/k
  890.           ${test:s/out/in/:f}  -> a.in f.in k.in
  891.           $(test:f:t"+")       -> a.out+f.out+k.out
  892.  
  893.  
  894.  
  895.  
  896. Version 3.70                    UW                             14
  897.  
  898.  
  899.  
  900.  
  901. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  902.  
  903.  
  904.  
  905.      If a token ends in a string composed from the value of the
  906.      macro DIRBRKSTR (ie. ends in a directory separator string,
  907.      e.g. '/' in UNIX) and you use the :d modifier then the
  908.      expansion returns the directory name less the final direc-
  909.      tory separator string.  Thus successive pairs of :d modif-
  910.      iers each remove a level of directory in the token string.
  911.  
  912.      The tokenization modifier takes all white space separated
  913.      tokens from the macro value and separates them by the quoted
  914.      separator string.  The separator string may contain the fol-
  915.      lowing escape codes \a => <bel>, \b => <backspace>, \f =>
  916.      <formfeed>, \n => <nl>, \r => <cr>, \t => <tab>, \v =>
  917.      <vertical tab>, \" => ", and \xxx => <xxx> where xxx is the
  918.      octal representation of a character.  Thus the expansion:
  919.  
  920.           $(test:f:t"+\n")
  921.      produces:
  922.           a.out+
  923.           f.out+
  924.           k.out
  925.  
  926.      The second non-standard form of macro expansion allows for
  927.      recursive macros.  It is possible to specify a $(macro_name)
  928.      or ${macro_name} expansion where macro_name contains more $(
  929.      ... ) or ${ ... } macro expansions itself.
  930.  
  931.      For example $(CC$(_HOST)$(_COMPILER)) will first expand
  932.      CC$(_HOST)$(_COMPILER) to get a result and use that result
  933.      as the name of the macro to expand.  This is useful for
  934.      writing a makefile for more than one target environment.  As
  935.      an example consider the following hypothetical case. Suppose
  936.      that _HOST and _COMPILER are imported from the environment
  937.      and are set to represent the host machine type and the host
  938.      compiler respectively.
  939.  
  940.           CFLAGS_VAX_CC = -c -O     # _HOST == "_VAX", _COMPILER == "_CC"
  941.           CFLAGS_PC_MSC = -c -ML # _HOST == "_PC",  _COMPILER == "_MSC"
  942.  
  943.           # redefine CFLAGS macro as:
  944.  
  945.           CFLAGS := $(CFLAGS$(_HOST)$(_COMPILER))
  946.  
  947.      This causes CFLAGS to take on a value that corresponds to
  948.      the environment in which the make is being invoked.
  949.  
  950.      The final non-standard macro expansion is of the form:
  951.  
  952.           string1{token_list}string2
  953.  
  954.      where string1, string2 and token_list are expanded.  After
  955.      expansion, string1 is prepended to each token found in
  956.      token_list and string2 is appended to each resulting token
  957.  
  958.  
  959.  
  960. Version 3.70                    UW                             15
  961.  
  962.  
  963.  
  964.  
  965. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  966.  
  967.  
  968.  
  969.      from the previous prepend.  string1 and string2 are not del-
  970.      imited by white space whereas the tokens in token_list are.
  971.      A null token in the token list is specified using "".  Thus
  972.      using another example we have:
  973.  
  974.           test/{f1 f2}.o     --> test/f1.o test/f2.o
  975.           test/ {f1 f2}.o    --> test/ f1.o f2.o
  976.           test/{f1 f2} .o    --> test/f1 test/f2 .o
  977.           test/{"f1"  ""}.o  --> test/f1.o test/.o
  978.  
  979.           and
  980.  
  981.           test/{d1 d2}/{f1 f2}.o --> test/d1/f1.o test/d1/f2.o
  982.                                      test/d2/f1.o test/d2/f2.o
  983.  
  984.      This last expansion is activated only when the first charac-
  985.      ters of token_list appear immediately after the opening '{'
  986.      with no intervening white space.  The reason for this res-
  987.      triction is the following incompatibility with Bourne Shell
  988.      recipes.  The line
  989.  
  990.           { echo hello;}
  991.  
  992.      is valid /bin/sh syntax; while
  993.  
  994.           {echo hello;}
  995.  
  996.      is not.  Hence the latter triggers the enhanced macro expan-
  997.      sion while the former causes it to be suppressed.  See the
  998.      SPECIAL MACROS section for a description of the special mac-
  999.      ros that dmake defines and understands.
  1000.  
  1001. RULES AND TARGETS
  1002.      A makefile contains a series of entries that specify depen-
  1003.      dencies.  Such entries are called target/prerequisite or
  1004.      rule definitions.  Each rule definition is optionally fol-
  1005.      lowed by a set of lines that provide a recipe for updating
  1006.      any targets defined by the rule.  Whenever dmake attempts to
  1007.      bring a target up to date and an explicit recipe is provided
  1008.      with a rule defining the target, that recipe is used to
  1009.      update the target.  A rule definition begins with a line
  1010.      having the following syntax:
  1011.  
  1012.           <targets> [<attributes>] <ruleop> [<prerequisites>] [;<recipe>]
  1013.  
  1014.      targets is a non-empty list of targets.  If the target is a
  1015.      special target (see SPECIAL TARGETS section below) then it
  1016.      must appear alone on the rule line.  For example:
  1017.  
  1018.           .IMPORT .ERROR : ...
  1019.  
  1020.      is not allowed since both .IMPORT and .ERROR are special
  1021.  
  1022.  
  1023.  
  1024. Version 3.70                    UW                             16
  1025.  
  1026.  
  1027.  
  1028.  
  1029. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1030.  
  1031.  
  1032.  
  1033.      targets.  Special targets are not used in the construction
  1034.      of the dependency graph and will not be made.
  1035.  
  1036.      attributes is a possibly empty list of attributes.  Any
  1037.      attribute defined in the ATTRIBUTES section above may be
  1038.      specified.  All attributes will be applied to the list of
  1039.      named targets in the rule definition.  No other targets will
  1040.      be affected.
  1041.  
  1042.  
  1043.      NOTE:   As stated earlier, if both the target list and
  1044.              prerequisite list are empty but the attributes list
  1045.              is not, then the specified attributes affect all
  1046.              targets in the makefile.
  1047.  
  1048.  
  1049.      ruleop is a separator which is used to identify the targets
  1050.      from the prerequisites.  Optionally it also provides a
  1051.      facility for modifying the way in which dmake handles the
  1052.      making of the associated targets.  In its simplest form the
  1053.      operator is a single ':', and need not be separated by white
  1054.      space from its neighboring tokens.  It may additionally be
  1055.      followed by any of the modifiers { !, ^, -, : }, where:
  1056.  
  1057.  
  1058.      !    says execute the recipe for the associated targets once
  1059.           for each out of date prerequisite.  Ordinarily the
  1060.           recipe is executed once for all out of date prere-
  1061.           quisites at the same time.
  1062.  
  1063.      ^    says to insert the specified prerequisites, if any,
  1064.           before any other prerequisites already associated with
  1065.           the specified targets.  In general, it is not useful to
  1066.           specify ^ with an empty list of prerequisites.
  1067.  
  1068.      -    says to clear the previous list of prerequisites before
  1069.           adding the new prerequisites.  Thus,
  1070.  
  1071.                .SUFFIXES :
  1072.                .SUFFIXES : .a .b
  1073.  
  1074.           can be replaced by
  1075.  
  1076.                .SUFFIXES :- .a .b
  1077.  
  1078.           however the old form still works as expected.  NOTE:
  1079.           .SUFFIXES is ignored by dmake it is used here simply as
  1080.           an example.
  1081.  
  1082.      :    When the rule operator is not modified by a second ':'
  1083.           only one set of rules may be specified for making a
  1084.           target.  Multiple definitions may be used to add to the
  1085.  
  1086.  
  1087.  
  1088. Version 3.70                    UW                             17
  1089.  
  1090.  
  1091.  
  1092.  
  1093. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1094.  
  1095.  
  1096.  
  1097.           list of prerequisites that a target depends on.  How-
  1098.           ever, if a target is multiply defined only one defini-
  1099.           tion may specify a recipe for making the target.
  1100.  
  1101.           When a target's rule operator is modified by a second
  1102.           ':' (:: for example) then this definition may not be
  1103.           the only definition with a recipe for the target.
  1104.           There may be other :: target definition lines that
  1105.           specify a different set of prerequisites with a dif-
  1106.           ferent recipe for updating the target. Any such target
  1107.           is made if any of the definitions find it to be out of
  1108.           date with respect to the related prerequisites and the
  1109.           corresponding recipe is used to update the target.
  1110.  
  1111.           In the following simple example, each rule has a `::'
  1112.           ruleop.  In such an operator we call the first `:' the
  1113.           operator, and the second `:' the modifier.
  1114.  
  1115.           a.o :: a.c b.h
  1116.              first recipe for making a.o
  1117.  
  1118.           a.o :: a.y b.h
  1119.              second recipe for making a.o
  1120.  
  1121.           If a.o is found to be out of date with respect to a.c
  1122.           then the first recipe is used to make a.o.  If it is
  1123.           found out of date with respect to a.y then the second
  1124.           recipe is used.  If a.o is out of date with respect to
  1125.           b.h then both recipes are invoked to make a.o.  In the
  1126.           last case the order of invocation corresponds to the
  1127.           order in which the rule definitions appear in the
  1128.           makefile.
  1129.  
  1130.      Targets defined using a single `:' operator with a recipe
  1131.      may be redefined again with a new recipe by using a `:'
  1132.      operator with a `:' modifier.  This is equivalent to a tar-
  1133.      get having been initially defined with a rule using a `:'
  1134.      modifier.  Once a target is defined using a `:' modifier it
  1135.      may not be defined again with a recipe using only the `:'
  1136.      operator with no `:' modifier.  In both cases the use of a
  1137.      `:' modifier creates a new list of prerequisites and makes
  1138.      it the current prerequisite list for the target.  The `:'
  1139.      operator with no recipe always modifies the current list of
  1140.      prerequisites.  Thus assuming each of the following defini-
  1141.      tions has a recipe attached, then:
  1142.  
  1143.           joe :  fred ...     (1)
  1144.           joe :: more ...     (2)
  1145.  
  1146.           and
  1147.  
  1148.           joe :: fred ...     (3)
  1149.  
  1150.  
  1151.  
  1152. Version 3.70                    UW                             18
  1153.  
  1154.  
  1155.  
  1156.  
  1157. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1158.  
  1159.  
  1160.  
  1161.           joe :: more ...     (4)
  1162.  
  1163.      are legal and mean:  add the recipe associated with (2), or
  1164.      (4) to the set of recipes for joe, placing them after exist-
  1165.      ing recipes for making joe.  The constructs:
  1166.  
  1167.           joe :: fred ...     (5)
  1168.           joe : more ... (6)
  1169.  
  1170.           and
  1171.  
  1172.           joe : fred ... (7)
  1173.           joe : more ... (8)
  1174.  
  1175.      are errors since we have two sets of perfectly good recipes
  1176.      for making the target.
  1177.  
  1178.      prerequisites is a possibly empty list of targets that must
  1179.      be brought up to date before making the current target.
  1180.  
  1181.      recipe is a short form and allows the user to specify short
  1182.      rule definitions on a single line.  It is taken to be the
  1183.      first recipe line in a larger recipe if additional lines
  1184.      follow the rule definition.  If the semi-colon is present
  1185.      but the recipe line is empty (ie. null string) then it is
  1186.      taken to be an empty rule.  Any target so defined causes the
  1187.      Don't know how to make ... error message to be suppressed
  1188.      when dmake tries to make the target and fails.  This silence
  1189.      is maintained for rules that are terminated by a semicolon
  1190.      and have no following recipe lines, for targets listed on
  1191.      the command line, for the first target found in the
  1192.      makefile, and for any target having no recipe but containing
  1193.      a list of prerequisites (see the COMPATIBILITY section for
  1194.      an exception to this rule if the AUGMAKE (-A) flag was
  1195.      specified.
  1196.  
  1197. RECIPES
  1198.      The traditional format used by most versions of Make defines
  1199.      the recipe lines as arbitrary strings that may contain macro
  1200.      expansions.  They follow a rule definition line and may be
  1201.      spaced apart by comment or blank lines.  The list of recipe
  1202.      lines defining the recipe is terminated by a new target
  1203.      definition, a macro definition, or end-of-file.  Each recipe
  1204.      line MUST begin with a <TAB> character which may optionally
  1205.      be followed with one or all of the characters '@%+-'.  The
  1206.      '-' indicates that non-zero exit values (ie. errors) are to
  1207.      be ignored when this recipe line is executed, the '+' indi-
  1208.      cates that the current recipe line is to be executed using
  1209.      the shell, the '%' indicates that dmake should swap itself
  1210.      out to secondary storage (MSDOS only) before running the
  1211.      recipe and the '@' indicates that the recipe line should NOT
  1212.      be echoed to the terminal prior to being executed.  Each
  1213.  
  1214.  
  1215.  
  1216. Version 3.70                    UW                             19
  1217.  
  1218.  
  1219.  
  1220.  
  1221. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1222.  
  1223.  
  1224.  
  1225.      switch is off by default (ie. by default, errors are signi-
  1226.      ficant, commands are echoed, no swapping is done and a shell
  1227.      is used only if the recipe line contains a character found
  1228.      in the value of the SHELLMETAS macro).  Global settings
  1229.      activated via command line options or special attribute or
  1230.      target names may also affect these settings.  An example
  1231.      recipe:
  1232.  
  1233.           target :
  1234.                first recipe line
  1235.                second recipe line, executed independently of the first.
  1236.                @a recipe line that is not echoed
  1237.                -and one that has errors ignored
  1238.                %and one that causes dmake to swap out
  1239.                +and one that is executed using a shell.
  1240.  
  1241.      The second and new format of the recipe block begins the
  1242.      block with the character '[' (the open group character) in
  1243.      the last non-white space position of a line, and terminates
  1244.      the block with the character ']' (the close group character)
  1245.      in the first non-white space position of a line.  In this
  1246.      form each recipe line need not have a leading TAB.  This is
  1247.      called a recipe group.  Groups so defined are fed intact as
  1248.      a single unit to a shell for execution whenever the
  1249.      corresponding target needs to be updated.  If the open group
  1250.      character '[' is preceded by one or all of -, @ or % then
  1251.      they apply to the entire group in the same way that they
  1252.      apply to single recipe lines.  You may also specify '+' but
  1253.      it is redundant as a shell is already being used to run the
  1254.      recipe.  See the MAKING TARGETS section for a description of
  1255.      how dmake invokes recipes.  Here is an example of a group
  1256.      recipe:
  1257.  
  1258.           target :
  1259.           [
  1260.                first recipe line
  1261.                second recipe line
  1262.                all of these recipe lines are fed to a
  1263.                single copy of a shell for execution.
  1264.           ]
  1265.  
  1266.  
  1267. TEXT DIVERSIONS
  1268.      dmake supports the notion of text diversions.  If a recipe
  1269.      line contains the macro expression
  1270.  
  1271.           $(mktmp[,[file][,text]] data)
  1272.  
  1273.      then all text contained in the data expression is expanded
  1274.      and is written to a temporary file.  The return value of the
  1275.      macro is the name of the temporary file.
  1276.  
  1277.  
  1278.  
  1279.  
  1280. Version 3.70                    UW                             20
  1281.  
  1282.  
  1283.  
  1284.  
  1285. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1286.  
  1287.  
  1288.  
  1289.      data can be any text and must be separated from the 'mktmp'
  1290.      portion of the macro name by white-space.  The only restric-
  1291.      tion on the data text is that it must contain a balanced
  1292.      number of parentheses of the same kind as are used to ini-
  1293.      tiate the $(mktmp ...) expression.  For example:
  1294.  
  1295.           $(mktmp $(XXX))
  1296.  
  1297.      is legal and works as expected, but:
  1298.  
  1299.           $(mktmp text (to dump to file)
  1300.  
  1301.      is not legal.  You can achieve what you wish by either
  1302.      defining a macro that expands to '(' or by using {} in the
  1303.      macro expression; like this:
  1304.  
  1305.           ${mktmp text (to dump to file}
  1306.  
  1307.      Since the temporary file is opened when the macro containing
  1308.      the text diversion expression is expanded, diversions may
  1309.      now be nested and any diversions that are created as part of
  1310.      ':=' macro expansions persist for the duration of the dmake
  1311.      run.  The diversion text may contain the same escape codes
  1312.      as those described in the MACROS section.  Thus if the data
  1313.      text is to contain new lines they must be inserted using the
  1314.      \n escape sequence.  For example the expression:
  1315.  
  1316.           all:
  1317.                cat $(mktmp this is a\n\
  1318.                test of the text diversion\n)
  1319.  
  1320.      is replaced by:
  1321.  
  1322.           cat /tmp/mk12294AA
  1323.  
  1324.      where the temporary file contains two lines both of which
  1325.      are terminated by a new-line.  If the data text spans multi-
  1326.      ple lines in the makefile then each line must be continued
  1327.      via the use of a \.  A second more illustrative example gen-
  1328.      erates a response file to an MSDOS link command:
  1329.  
  1330.           OBJ = fred.obj mary.obj joe.obj
  1331.           all : $(OBJ)
  1332.                link @$(mktmp $(^:t"+\n")\n)
  1333.  
  1334.      The result of making `all' in the second example is the com-
  1335.      mand:
  1336.  
  1337.           link @/tmp/mk02394AA
  1338.  
  1339.      where the temporary file contains:
  1340.  
  1341.  
  1342.  
  1343.  
  1344. Version 3.70                    UW                             21
  1345.  
  1346.  
  1347.  
  1348.  
  1349. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1350.  
  1351.  
  1352.  
  1353.           fred.obj+
  1354.           mary.obj+
  1355.           joe.obj
  1356.  
  1357.      The last line of the file is terminated by a new-line which
  1358.      is inserted due to the \n found at the end of the data
  1359.      string.
  1360.  
  1361.      If the optional file specifier is present then its expanded
  1362.      value is the name of the temporary file to create.  Whenever
  1363.      a $(mktmp ...) macro is expanded the macro $(TMPFILE) is set
  1364.      to a new temporary file name.  Thus the construct:
  1365.  
  1366.           $(mktmp,$(TMPFILE) data)
  1367.  
  1368.      is completely equivalent to not specifying the $(TMPFILE)
  1369.      optional argument.  Another example that would be useful for
  1370.      MSDOS users with a Turbo-C compiler
  1371.  
  1372.           $(mktmp,turboc.cfg $(CFLAGS))
  1373.  
  1374.      will place the contents of CFLAGS into a local turboc.cfg
  1375.      file.  The second optional argument, text, if present alters
  1376.      the name of the value returned by the $(mktmp ...) macro.
  1377.  
  1378.      Under MS-DOS text diversions may be a problem.  Many DOS
  1379.      tools require that path names which contain directories use
  1380.      the \ character to delimit the directories.  Some users how-
  1381.      ever wish to use the '/' to delimit pathnames and use
  1382.      environments that allow them to do so.  The macro USESHELL
  1383.      is set to "yes" if the current recipe is forced to use a
  1384.      shell via the .USESHELL or '+' directives, otherwise its
  1385.      value is "no".  The dmake startup files define the macro
  1386.      DIVFILE whose value is either the value of TMPFILE or the
  1387.      value of TMPFILE edited to replace any '/' characters to the
  1388.      appropriate value based on the current shell and whether it
  1389.      will be used to execute the recipe.
  1390.  
  1391.      Previous versions of dmake defined text diversions using <+,
  1392.      +> strings, where <+ started a text diversion and +> ter-
  1393.      minated one.  dmake is backward compatible with this con-
  1394.      struct if the <+ and +> appear literally on the same recipe
  1395.      line or in the same macro value string.  In such instances
  1396.      the expression:
  1397.  
  1398.           <+data+>
  1399.  
  1400.      is mapped to:
  1401.  
  1402.           $(mktmp data)
  1403.  
  1404.      which is fully output compatible with the earlier construct.
  1405.  
  1406.  
  1407.  
  1408. Version 3.70                    UW                             22
  1409.  
  1410.  
  1411.  
  1412.  
  1413. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1414.  
  1415.  
  1416.  
  1417.      <+, +> constructs whose text spans multiple lines must be
  1418.      converted by hand to use $(mktmp ...).
  1419.  
  1420.      If the environment variable TMPDIR is defined then the tem-
  1421.      porary file is placed into the directory specified by that
  1422.      variable.  A makefile can modify the location of temporary
  1423.      files by defining a macro named TMPDIR and exporting it
  1424.      using the .EXPORT special target.
  1425.  
  1426. SPECIAL TARGETS
  1427.      This section describes the special targets that are recog-
  1428.      nized by dmake.  Some are affected by attributes and others
  1429.      are not.
  1430.  
  1431.      .ERROR        If defined then the recipe associated with
  1432.                    this target is executed whenever an error con-
  1433.                    dition is detected by dmake.  All attributes
  1434.                    that can be used with any other target may be
  1435.                    used with this target.  Any prerequisites of
  1436.                    this target will be brought up to date during
  1437.                    its processing.  NOTE:  errors will be ignored
  1438.                    while making this target, in extreme cases
  1439.                    this may cause some problems.
  1440.  
  1441.      .EXPORT       All prerequisites associated with this target
  1442.                    are assumed to correspond to macro names and
  1443.                    they and their values are exported to the
  1444.                    environment as environment strings at the
  1445.                    point in the makefile at which this target
  1446.                    appears.  Any attributes specified with this
  1447.                    target are ignored.  Only macros which have
  1448.                    been assigned a value in the makefile prior to
  1449.                    the export directive are exported, macros as
  1450.                    yet undefined or macros whose value contains
  1451.                    any of the characters "+=:*" are not exported.
  1452.                    is suppre
  1453.  
  1454.      .IMPORT       Prerequisite names specified for this target
  1455.                    are searched for in the environment and
  1456.                    defined as macros with their value taken from
  1457.                    the environment.  If the special name .EVERY-
  1458.                    THING is used as a prerequisite name then all
  1459.                    environment variables defined in the environ-
  1460.                    ment are imported.  The functionality of the
  1461.                    -E flag can be forced by placing the construct
  1462.                    .IMPORT : .EVERYTHING at the start of a
  1463.                    makefile.  Similarly, by placing the construct
  1464.                    at the end, one can emulate the effect of the
  1465.                    -e command line flag.  If a prerequisite name
  1466.                    cannot be found in the environment an error
  1467.                    message is issued.  .IMPORT accepts the
  1468.                    .IGNORE attribute.  When given, it causes
  1469.  
  1470.  
  1471.  
  1472. Version 3.70                    UW                             23
  1473.  
  1474.  
  1475.  
  1476.  
  1477. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1478.  
  1479.  
  1480.  
  1481.                    dmake to ignore the above error.  See the MAC-
  1482.                    ROS section for a description of the process-
  1483.                    ing of imported macro values.
  1484.  
  1485.      .INCLUDE      Parse another makefile just as if it had been
  1486.                    located at the point of the .INCLUDE in the
  1487.                    current makefile.  The list of prerequisites
  1488.                    gives the list of makefiles to try to read.
  1489.                    If the list contains multiple makefiles then
  1490.                    they are read in order from left to right.
  1491.                    The following search rules are used when try-
  1492.                    ing to locate the file.  If the filename is
  1493.                    surrounded by " or just by itself then it is
  1494.                    searched for in the current directory.  If it
  1495.                    is not found it is then searched for in each
  1496.                    of the directories specified for the .INCLU-
  1497.                    DEDIRS special target.  If the file name is
  1498.                    surrounded by < and >, (ie.
  1499.                    <my_spiffy_new_makefile>) then it is searched
  1500.                    for only in the directories given by the
  1501.                    .INCLUDEDIRS special target.  In both cases if
  1502.                    the file name is a fully qualified name start-
  1503.                    ing at the root of the file system then it is
  1504.                    only searched for once, and the .INCLUDEDIRS
  1505.                    list is ignored.  .INCLUDE accepts the .IGNORE
  1506.                    and .SETDIR attributes.  If .IGNORE attribute
  1507.                    is given and the file cannot be found then
  1508.                    dmake continues processing, otherwise an error
  1509.                    message is generated.  The .SETDIR attribute
  1510.                    causes dmake to change directories to the
  1511.                    specified directory prior to attempting the
  1512.                    include operation.
  1513.  
  1514.      .INCLUDEDIRS  The list of prerequisites specified for this
  1515.                    target defines the set of directories to
  1516.                    search when trying to include a makefile.
  1517.  
  1518.      .KEEP_STATE   This special target is a synonym for the macro
  1519.                    definition
  1520.  
  1521.                         .KEEP_STATE := _state.mk
  1522.  
  1523.                    It's effect is to turn on STATE keeping and to
  1524.                    define _state.mk as the state file.
  1525.  
  1526.      .MAKEFILES    The list of prerequisites is the set of files
  1527.                    to try to read as the default makefile.  By
  1528.                    default this target is defined as:
  1529.  
  1530.                         .MAKEFILES : makefile.mk Makefile
  1531.                    makefile
  1532.  
  1533.  
  1534.  
  1535.  
  1536. Version 3.70                    UW                             24
  1537.  
  1538.  
  1539.  
  1540.  
  1541. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1542.  
  1543.  
  1544.  
  1545.      .SOURCE       The prerequisite list of this target defines a
  1546.                    set of directories to check when trying to
  1547.                    locate a target file name.  See the section on
  1548.                    BINDING of targets for more information.
  1549.  
  1550.      .SOURCE.suff  The same as .SOURCE, except that the
  1551.                    .SOURCE.suff list is searched first when try-
  1552.                    ing to locate a file matching the a target
  1553.                    whose name ends in the suffix .suff.
  1554.  
  1555.      .REMOVE       The recipe of this target is used whenever
  1556.                    dmake needs to remove intermediate targets
  1557.                    that were made but do not need to be kept
  1558.                    around.  Such targets result from the applica-
  1559.                    tion of transitive closure on the dependency
  1560.                    graph.
  1561.  
  1562.      In addition to the special targets above, several other
  1563.      forms of targets are recognized and are considered special,
  1564.      their exact form and use is defined in the sections that
  1565.      follow.
  1566.  
  1567. SPECIAL MACROS
  1568.      dmake defines a number of special macros.  They are divided
  1569.      into three classes: control macros, run-time macros, and
  1570.      function macros.  The control macros are used by dmake to
  1571.      configure its actions, and are the preferred method of doing
  1572.      so.  In the case when a control macro has the same function
  1573.      as a special target or attribute they share the same name as
  1574.      the special target or attribute.  The run-time macros are
  1575.      defined when dmake makes targets and may be used by the user
  1576.      inside recipes.  The function macros provide higher level
  1577.      functions dealing with macro expansion and diversion file
  1578.      processing.
  1579.  
  1580. CONTROL MACROS
  1581.      To use the control macros simply assign them a value just
  1582.      like any other macro.  The control macros are divided into
  1583.      three groups: string valued macros, character valued macros,
  1584.      and boolean valued macros.
  1585.  
  1586.      The following are all of the string valued macros.  This
  1587.      list is divided into two groups.  The first group gives the
  1588.      string valued macros that are defined internally and cannot
  1589.      be directly set by the user.
  1590.  
  1591.      DIRBRKSTR     Contains the string of chars used to terminate
  1592.                    the name of a directory in a pathname.  Under
  1593.                    UNIX its value is "/", under MSDOS its value
  1594.                    is "/\:".
  1595.  
  1596.  
  1597.  
  1598.  
  1599.  
  1600. Version 3.70                    UW                             25
  1601.  
  1602.  
  1603.  
  1604.  
  1605. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1606.  
  1607.  
  1608.  
  1609.      INCDEPTH      This macro's value is a string of digits
  1610.                    representing the current depth of makefile
  1611.                    inclusion.  In the first makefile level this
  1612.                    value is zero.
  1613.  
  1614.      MFLAGS        Is the list of flags that were given on the
  1615.                    command line including a leading switch char-
  1616.                    acter.  The -f flag is not included in this
  1617.                    list.
  1618.  
  1619.      MAKECMD       Is the name with which dmake was invoked.
  1620.  
  1621.      MAKEDIR       Is the full path to the initial directory in
  1622.                    which dmake was invoked.
  1623.  
  1624.      MAKEFILE      Contains the string "-f makefile" where,
  1625.                    makefile is the name of initial user makefile
  1626.                    that was first read.
  1627.  
  1628.      MAKEFLAGS     Is the same as $(MFLAGS) but has no leading
  1629.                    switch character. (ie. MFLAGS = -$(MAKEFLAGS))
  1630.  
  1631.      MAKEMACROS    Contains the complete list of macro expres-
  1632.                    sions that were specified on the command line.
  1633.  
  1634.      MAKETARGETS   Contains the name(s) of the target(s), if any,
  1635.                    that were specified on the command line.
  1636.  
  1637.      MAXPROCESSLIMIT
  1638.                    Is a numeric string representing the maximum
  1639.                    number of processes that dmake can use when
  1640.                    making targets using parallel mode.
  1641.  
  1642.      NULL          Is permanently defined to be the NULL string.
  1643.                    This is useful when comparing a conditional
  1644.                    expression to an NULL value.
  1645.  
  1646.      PWD           Is the full path to the current directory in
  1647.                    which make is executing.
  1648.  
  1649.      TMPFILE       Is set to the name of the most recent tem-
  1650.                    porary file opened by dmake.  Temporary files
  1651.                    are used for text diversions and for group
  1652.                    recipe processing.
  1653.  
  1654.      TMD           Stands for "To Make Dir", and is the path from
  1655.                    the present directory (value of $(PWD)) to the
  1656.                    directory that dmake was started up in (value
  1657.                    of $(MAKEDIR)).  This macro is modified when
  1658.                    .SETDIR attributes are processed.
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664. Version 3.70                    UW                             26
  1665.  
  1666.  
  1667.  
  1668.  
  1669. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1670.  
  1671.  
  1672.  
  1673.      USESHELL      The value of this macro is set to "yes" if the
  1674.                    current recipe is forced to use a shell for
  1675.                    its execution via the .USESHELL or '+' direc-
  1676.                    tives, its value is "no" otherwise.
  1677.  
  1678.  
  1679.      The second group of string valued macros control dmake
  1680.      behavior and may be set by the user.
  1681.  
  1682.      .NOTABS         When set to non-NULL enables the use of
  1683.                      spaces as well as <tabs> to begin recipe
  1684.                      lines.  By default a non-group recipe is
  1685.                      terminated by a line without any leading
  1686.                      white-space or by a line not beggining with
  1687.                      a <tab> character.  Enabling this mode modi-
  1688.                      fies the first condition of the above termi-
  1689.                      nation rule to terminate a non-group recipe
  1690.                      with a line that contains only white-space.
  1691.                      This mode does not effect the parsing of
  1692.                      group recipes bracketed by [].
  1693.  
  1694.      .SETDIR         If this macro is assigned a value then dmake
  1695.                      will change to the directory given by that
  1696.                      value before making any targets.
  1697.  
  1698.      AUGMAKE         If set to a non NULL value will enable the
  1699.                      transformation of special meta targets to
  1700.                      support special AUGMAKE inferences (See the
  1701.                      COMPATIBILITY section).
  1702.  
  1703.      DIRSEPSTR       Contains the string that is used to separate
  1704.                      directory components when path names are
  1705.                      constructed.  It is defined with a default
  1706.                      value at startup.
  1707.  
  1708.      DIVFILE         Is defined in the startup file and gives the
  1709.                      name that should be returned for the diver-
  1710.                      sion file name when used in $(mktmp ...)
  1711.                      expansions, see the TEXT DIVERSION section
  1712.                      for details.
  1713.  
  1714.      .KEEP_STATE     Assigning this macro a value tells dmake the
  1715.                      name of the state file to use and turns on
  1716.                      the keeping of state information for any
  1717.                      targets that are brought up to date by the
  1718.                      make.
  1719.  
  1720.      GROUPFLAGS      This macro gives the set of flags to pass to
  1721.                      the shell when invoking it to execute a
  1722.                      group recipe.  The value of the macro is the
  1723.                      list of flags with a leading switch indica-
  1724.                      tor.  (ie. `-' under UNIX)
  1725.  
  1726.  
  1727.  
  1728. Version 3.70                    UW                             27
  1729.  
  1730.  
  1731.  
  1732.  
  1733. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1734.  
  1735.  
  1736.  
  1737.      GROUPSHELL      This macro defines the full path to the exe-
  1738.                      cutable image to be used as the shell when
  1739.                      processing group recipes.  This macro must
  1740.                      be defined if group recipes are used.  It is
  1741.                      assigned a default value in the startup
  1742.                      makefile.  Under UNIX this value is /bin/sh.
  1743.  
  1744.      GROUPSUFFIX     If defined, this macro gives the string to
  1745.                      use as a suffix when creating group recipe
  1746.                      files to be handed to the command inter-
  1747.                      preter.  For example, if it is defined as
  1748.                      .sh, then all temporary files created by
  1749.                      dmake will end in the suffix .sh.  Under
  1750.                      MSDOS if you are using command.com as your
  1751.                      GROUPSHELL, then this suffix must be set to
  1752.                      .bat in order for group recipes to function
  1753.                      correctly.  The setting of GROUPSUFFIX and
  1754.                      GROUPSHELL is done automatically for
  1755.                      command.com in the startup.mk files.
  1756.  
  1757.      MAKE            Is defined in the startup file by default.
  1758.                      The string $(MAKE) is recognized when using
  1759.                      the -n option for single line recipes.  Ini-
  1760.                      tially this macro is defined to have the
  1761.                      value "$(MAKECMD) $(MFLAGS)".
  1762.  
  1763.      MAKESTARTUP     This macro defines the full path to the ini-
  1764.                      tial startup makefile.  Use the -V command
  1765.                      line option to discover its initial value.
  1766.  
  1767.      MAXLINELENGTH   This macro defines the maximum size of a
  1768.                      single line of makefile input text.  The
  1769.                      size is specified as a number, the default
  1770.                      value is defined internally and is shown via
  1771.                      the -V option.  A buffer of this size plus 2
  1772.                      is allocated for reading makefile text.  The
  1773.                      buffer is freed before any targets are made,
  1774.                      thereby allowing files containing long input
  1775.                      lines to be processed without consuming
  1776.                      memory during the actual make.  This macro
  1777.                      can only be used to extend the line length
  1778.                      beyond it's default minimum value.
  1779.  
  1780.      MAXPROCESS      Specify the maximum number of child
  1781.                      processes to use when making targets.  The
  1782.                      default value of this macro is "1" and its
  1783.                      value cannot exceed the value of the macro
  1784.                      MAXPROCESSLIMIT.  Setting the value of MAX-
  1785.                      PROCESS on the command line or in the
  1786.                      makefile is equivalent to supplying a
  1787.                      corresponding value to the -P flag on the
  1788.                      command line.
  1789.  
  1790.  
  1791.  
  1792. Version 3.70                    UW                             28
  1793.  
  1794.  
  1795.  
  1796.  
  1797. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1798.  
  1799.  
  1800.  
  1801.      PREP            This macro defines the number of iterations
  1802.                      to be expanded automatically when processing
  1803.                      % rule definitions of the form:
  1804.  
  1805.                      % : %.suff
  1806.  
  1807.                      See the sections on PERCENT(%) RULES for
  1808.                      details on how PREP is used.
  1809.  
  1810.      SHELL           This macro defines the full path to the exe-
  1811.                      cutable image to be used as the shell when
  1812.                      processing single line recipes.  This macro
  1813.                      must be defined if recipes requiring the
  1814.                      shell for execution are to be used.  It is
  1815.                      assigned a default value in the startup
  1816.                      makefile.  Under UNIX this value is /bin/sh.
  1817.  
  1818.      SHELLFLAGS      This macro gives the set of flags to pass to
  1819.                      the shell when invoking it to execute a sin-
  1820.                      gle line recipe.  The value of the macro is
  1821.                      the list of flags with a leading switch
  1822.                      indicator.  (ie. `-' under UNIX)
  1823.  
  1824.      SHELLMETAS      Each time dmake executes a single recipe
  1825.                      line (not a group recipe) the line is
  1826.                      searched for any occurrence of a character
  1827.                      defined in the value of SHELLMETAS.  If such
  1828.                      a character is found the recipe line is
  1829.                      defined to require a shell to ensure its
  1830.                      correct execution.  In such instances a
  1831.                      shell is used to invoke the recipe line.  If
  1832.                      no match is found the recipe line is exe-
  1833.                      cuted without the use of a shell.
  1834.  
  1835.  
  1836.      There is only one character valued macro defined by dmake:
  1837.      SWITCHAR contains the switch character used to introduce
  1838.      options on command lines.  For UNIX its value is `-', and
  1839.      for MSDOS its value may be `/' or `-'.  The macro is inter-
  1840.      nally defined and is not user setable.  The MSDOS version of
  1841.      dmake attempts to first extract SWITCHAR from an environment
  1842.      variable of the same name.  If that fails it then attempts
  1843.      to use the undocumented getswitchar system call, and returns
  1844.      the result of that.  Under MSDOS version 4.0 you must set
  1845.      the value of the environment macro SWITCHAR to '/' to obtain
  1846.      predictable behavior.
  1847.  
  1848.      All boolean macros currently understood by dmake correspond
  1849.      directly to the previously defined attributes.  These macros
  1850.      provide a second way to apply global attributes, and
  1851.      represent the preferred method of doing so.  They are used
  1852.      by assigning them a value.  If the value is not a NULL
  1853.  
  1854.  
  1855.  
  1856. Version 3.70                    UW                             29
  1857.  
  1858.  
  1859.  
  1860.  
  1861. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1862.  
  1863.  
  1864.  
  1865.      string then the boolean condition is set to on.  If the
  1866.      value is a NULL string then the condition is set to off.
  1867.      There are five conditions defined and they correspond
  1868.      directly to the attributes of the same name.  Their meanings
  1869.      are defined in the ATTRIBUTES section above.  The macros
  1870.      are: .EPILOG, .IGNORE, .MKSARGS, .NOINFER, .PRECIOUS, .PRO-
  1871.      LOG, .SEQUENTIAL, .SILENT, .SWAP, and .USESHELL.  Assigning
  1872.      any of these a non NULL value will globally set the
  1873.      corresponding attribute to on.
  1874.  
  1875. RUN_TIME MACROS
  1876.      These macros are defined when dmake is making targets, and
  1877.      may take on different values for each target.  $@ is defined
  1878.      to be the full target name, $? is the list of all out of
  1879.      date prerequisites, $& is the list of all prerequisites, $>
  1880.      is the name of the library if the current target is a
  1881.      library member, and $< is the list of prerequisites speci-
  1882.      fied in the current rule.  If the current target had a
  1883.      recipe inferred then $< is the name of the inferred prere-
  1884.      quisite even if the target had a list of prerequisites sup-
  1885.      plied using an explicit rule that did not provide a recipe.
  1886.      In such situations $& gives the full list of prerequisites.
  1887.  
  1888.      $* is defined as $(@:db) when making targets with explicit
  1889.      recipes and is defined as the value of % when making targets
  1890.      whose recipe is the result of an inference.  In the first
  1891.      case $* is the target name with no suffix, and in the second
  1892.      case, is the value of the matched % pattern from the associ-
  1893.      ated %-rule.  $^ expands to the set of out of date prere-
  1894.      quisites taken from the current value of $<.  In addition to
  1895.      these, $$ expands to $, {{ expands to {, }} expands to },
  1896.      and the strings <+ and +> are recognized as respectively
  1897.      starting and terminating a text diversion when they appear
  1898.      literally together in the same input line.
  1899.  
  1900.      The difference between $? and $^ can best be illustrated by
  1901.      an example, consider:
  1902.  
  1903.           fred.out : joe amy hello
  1904.                rules for making fred
  1905.  
  1906.           fred.out : my.c your.h his.h her.h   # more prerequisites
  1907.  
  1908.      Assume joe, amy, and my.c are newer then fred.out.  When
  1909.      dmake executes the recipe for making fred.out the values of
  1910.      the following macros will be:
  1911.  
  1912.           $@ --> fred.out
  1913.           $* --> fred
  1914.           $? --> joe amy my.c  # note the difference between $? and $^
  1915.           $^ --> joe amy
  1916.           $< --> joe amy hello
  1917.  
  1918.  
  1919.  
  1920. Version 3.70                    UW                             30
  1921.  
  1922.  
  1923.  
  1924.  
  1925. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1926.  
  1927.  
  1928.  
  1929.           $& --> joe amy hello my.c your.h his.h her.h
  1930.  
  1931.  
  1932. FUNCTION MACROS
  1933.      dmake supports a full set of functional macros.  One of
  1934.      these, the $(mktmp ...) macro, is discussed in detail in the
  1935.      TEXT DIVERSION section and is not covered here.
  1936.  
  1937.  
  1938.           $(null,text true false)
  1939.                expands the value of text. If it is NULL then the
  1940.                macro returns the value of the expansion of true
  1941.                and the expansion of false otherwise.  The terms
  1942.                true, and false must be strings containing no
  1943.                white-space.
  1944.  
  1945.           $(!null,text true false)
  1946.                Behaves identically to the previous macro except
  1947.                that the true string is chosen if the expansion of
  1948.                text is not NULL.
  1949.  
  1950.           $(eq,text_a,text_b true false)
  1951.                expands text_a and text_b and compares their
  1952.                results.  If equal it returns the result of the
  1953.                expansion of the true term, otherwise it returns
  1954.                the expansion of the false term.
  1955.  
  1956.           $(!eq,text_a,text_b true false)
  1957.                Behaves identically to the previous macro except
  1958.                that the true string is chosen if the expansions
  1959.                of the two strings are not equal
  1960.  
  1961.           $(shell command)
  1962.                Runs command as if it were part of a recipe and
  1963.                returns, separated by a single space, all the
  1964.                non-white space terms written to stdout by the
  1965.                command.  For example:
  1966.  
  1967.                     $(shell ls *.c)
  1968.  
  1969.                will return "a.c b.c c.c d.c" if the files exist
  1970.                in the current directory.  The recipe modification
  1971.                flags [+@%-] are honored if they appear as the
  1972.                first characters in the command.  For example:
  1973.  
  1974.                     $(shell +ls *.c)
  1975.  
  1976.                will run the command using the current shell.
  1977.  
  1978.           $(sort list)
  1979.                Will take all white-space separated tokens in list
  1980.                and will return their sorted equivalent list.
  1981.  
  1982.  
  1983.  
  1984. Version 3.70                    UW                             31
  1985.  
  1986.  
  1987.  
  1988.  
  1989. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  1990.  
  1991.  
  1992.  
  1993.           $(strip data)
  1994.                Will replace all strings of white-space in data by
  1995.                a single space.
  1996.  
  1997.           $(subst,pat,replacement data)
  1998.                Will search for pat in data and will replace any
  1999.                occurrence of pat with the replacement string.
  2000.                The expansion
  2001.  
  2002.                     $(subst,.o,.c $(OBJECTS))
  2003.  
  2004.                is equivalent to:
  2005.  
  2006.                     $(OBJECTS:s/.o/.c/)
  2007.  
  2008.  
  2009. DYNAMIC PREREQUISITES
  2010.      dmake looks for prerequisites whose names contain macro
  2011.      expansions during target processing.  Any such prerequisites
  2012.      are expanded and the result of the expansion is used as the
  2013.      prerequisite name.  As an example the line:
  2014.  
  2015.           fred : $$@.c
  2016.  
  2017.      causes the $$@ to be expanded when dmake is making fred, and
  2018.      it resolves to the target fred.  This enables dynamic prere-
  2019.      quisites to be generated.  The value of @ may be modified by
  2020.      any of the valid macro modifiers.  So you can say for exam-
  2021.      ple:
  2022.  
  2023.           fred.out : $$(@:b).c
  2024.  
  2025.      where the $$(@:b) expands to fred.  Note the use of $$
  2026.      instead of $ to indicate the dynamic expansion, this is due
  2027.      to the fact that the rule line is expanded when it is ini-
  2028.      tially parsed, and $$ then returns $ which later triggers
  2029.      the dynamic prerequisite expansion.  If you really want a $
  2030.      to be part of a prerequisite name you must use $$$$.
  2031.      Dynamic macro expansion is performed in all user defined
  2032.      rules, and the special targets .SOURCE*, and .INCLUDEDIRS.
  2033.  
  2034. BINDING TARGETS
  2035.      This operation takes a target name and binds it to an exist-
  2036.      ing file, if possible.  dmake makes a distinction between
  2037.      the internal target name of a target and its associated
  2038.      external file name.  Thus it is possible for a target's
  2039.      internal name and its external file name to differ.  To per-
  2040.      form the binding, the following set of rules is used.
  2041.      Assume that we are trying to bind a target whose name is of
  2042.      the form X.suff, where .suff is the suffix and X is the stem
  2043.      portion (ie. that part which contains the directory and the
  2044.      basename).  dmake takes this target name and performs a
  2045.  
  2046.  
  2047.  
  2048. Version 3.70                    UW                             32
  2049.  
  2050.  
  2051.  
  2052.  
  2053. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2054.  
  2055.  
  2056.  
  2057.      series of search operations that try to find a suitably
  2058.      named file in the external file system.  The search opera-
  2059.      tion is user controlled via the settings of the various
  2060.      .SOURCE targets.
  2061.  
  2062.           1.   If target has the .SYMBOL attribute set then look
  2063.                for it in the library.  If found, replace the tar-
  2064.                get name with the library member name and continue
  2065.                with step 2.  If the name is not found then
  2066.                return.
  2067.  
  2068.           2.   Extract the suffix portion (that following the
  2069.                `.') of the target name.  If the suffix is not
  2070.                null, look up the special target .SOURCE.<suff>
  2071.                (<suff> is the suffix). If the special target
  2072.                exists then search each directory given in the
  2073.                .SOURCE.<suff> prerequisite list for the target.
  2074.                If the target's suffix was null (ie. .suff was
  2075.                empty) then perform the above search but use the
  2076.                special target .SOURCE.NULL instead.  If at any
  2077.                point a match is found then terminate the search.
  2078.                If a directory in the prerequisite list is the
  2079.                special name `.NULL ' perform a search for the
  2080.                full target name without prepending any directory
  2081.                portion (ie. prepend the NULL directory).  (a
  2082.                default target of '.SOURCE : .NULL' is defined by
  2083.                dmake at startup, and is user redefinable)
  2084.  
  2085.           3.   The search in step 2. failed.  Repeat the same
  2086.                search but this time use the special target
  2087.                .SOURCE.
  2088.  
  2089.           4.   The search in step 3. failed.  If the target has
  2090.                the library member attribute (.LIBMEMBER) set then
  2091.                try to find the target in the library which was
  2092.                passed along with the .LIBMEMBER attribute (see
  2093.                the MAKING LIBRARIES section).  The bound file
  2094.                name assigned to a target which is successfully
  2095.                located in a library is the same name that would
  2096.                be assigned had the search failed (see 5.).
  2097.  
  2098.           5.   The search failed.  Either the target was not
  2099.                found in any of the search directories or no
  2100.                applicable .SOURCE special targets exist.  If
  2101.                applicable .SOURCE special targets exist, but the
  2102.                target was not found, then dmake assigns the first
  2103.                name searched as the bound file name.  If no
  2104.                applicable .SOURCE special targets exist, then the
  2105.                full original target name becomes the bound file
  2106.                name.
  2107.  
  2108.  
  2109.  
  2110.  
  2111.  
  2112. Version 3.70                    UW                             33
  2113.  
  2114.  
  2115.  
  2116.  
  2117. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2118.  
  2119.  
  2120.  
  2121.      There is potential here for a lot of search operations.  The
  2122.      trick is to define .SOURCE.x special targets with short
  2123.      search lists and leave .SOURCE as short as possible.  The
  2124.      search algorithm has the following useful side effect.  When
  2125.      a target having the .LIBMEMBER (library member) attribute is
  2126.      searched for, it is first searched for as an ordinary file.
  2127.      When a number of library members require updating it is
  2128.      desirable to compile all of them first and to update the
  2129.      library at the end in a single operation.  If one of the
  2130.      members does not compile and dmake stops, then the user may
  2131.      fix the error and make again.  dmake will not remake any of
  2132.      the targets whose object files have already been generated
  2133.      as long as none of their prerequisite files have been modi-
  2134.      fied as a result of the fix.
  2135.  
  2136.      When defining .SOURCE and .SOURCE.x targets the construct
  2137.  
  2138.           .SOURCE :
  2139.           .SOURCE : fred gery
  2140.  
  2141.      is equivalent to
  2142.  
  2143.           .SOURCE :- fred gery
  2144.  
  2145.      dmake correctly handles the UNIX Make variable VPATH.  By
  2146.      definition VPATH contains a list of ':' separated direc-
  2147.      tories to search when looking for a target.  dmake maps
  2148.      VPATH to the following special rule:
  2149.  
  2150.           .SOURCE :^ $(VPATH:s/:/ /)
  2151.  
  2152.      Which takes the value of VPATH and sets .SOURCE to the same
  2153.      set of directories as specified in VPATH.
  2154.  
  2155. PERCENT(%) RULES AND MAKING INFERENCES
  2156.      When dmake makes a target, the target's set of prerequisites
  2157.      (if any) must exist and the target must have a recipe which
  2158.      dmake can use to make it.  If the makefile does not specify
  2159.      an explicit recipe for the target then dmake uses special
  2160.      rules to try to infer a recipe which it can use to make the
  2161.      target.  Previous versions of Make perform this task by
  2162.      using rules that are defined by targets of the form
  2163.      .<suffix>.<suffix> and by using the .SUFFIXES list of suf-
  2164.      fixes.  The exact workings of this mechanism were sometimes
  2165.      difficult to understand and often limiting in their useful-
  2166.      ness.  Instead, dmake supports the concept of %-meta rules.
  2167.      The syntax and semantics of these rules differ from standard
  2168.      rule lines as follows:
  2169.  
  2170.           <%-target> [<attributes>] <ruleop> [<%-prerequisites>] [;<recipe>]
  2171.  
  2172.      where %-target is a target containing exactly a single `%'
  2173.  
  2174.  
  2175.  
  2176. Version 3.70                    UW                             34
  2177.  
  2178.  
  2179.  
  2180.  
  2181. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2182.  
  2183.  
  2184.  
  2185.      sign, attributes is a list (possibly empty) of attributes,
  2186.      ruleop is the standard set of rule operators, %-prere-
  2187.      quisites , if present, is a list of prerequisites containing
  2188.      zero or more `%' signs, and recipe, if present, is the first
  2189.      line of the recipe.
  2190.  
  2191.      The %-target defines a pattern against which a target whose
  2192.      recipe is being inferred gets matched.  The pattern match
  2193.      goes as follows:  all chars are matched exactly from left to
  2194.      right up to but not including the % sign in the pattern, %
  2195.      then matches the longest string from the actual target name
  2196.      not ending in the suffix given after the % sign in the pat-
  2197.      tern.  Consider the following examples:
  2198.  
  2199.           %.c       matches fred.c but not joe.c.Z
  2200.           dir/%.c   matches dir/fred.c but not dd/fred.c
  2201.           fred/%    matches fred/joe.c but not f/joe.c
  2202.           %         matches anything
  2203.  
  2204.      In each case the part of the target name that matched the %
  2205.      sign is retained and is substituted for any % signs in the
  2206.      prerequisite list of the %-meta rule when the rule is
  2207.      selected during inference and dmake constructs the new
  2208.      dependency.  As an example the following %-meta rules
  2209.      describe the following:
  2210.  
  2211.           %.c : %.y ; recipe...
  2212.  
  2213.      describes how to make any file ending in .c if a correspond-
  2214.      ing file ending in .y can be found.
  2215.  
  2216.           foo%.o : fee%.k ; recipe...
  2217.  
  2218.      is used to describe how to make fooxxxx.o from feexxxx.k.
  2219.  
  2220.           %.a :; recipe...
  2221.  
  2222.      describes how to make a file whose suffix is .a without
  2223.      inferring any prerequisites.
  2224.  
  2225.           %.c : %.y yaccsrc/%.y ; recipe...
  2226.  
  2227.      is a short form for the construct:
  2228.  
  2229.           %.c : %.y ; recipe...
  2230.           %.c : yaccsrc/%.y ; recipe...
  2231.  
  2232.      ie. It is possible to specify the same recipe for two
  2233.      %-rules by giving more than one prerequisite in the prere-
  2234.      quisite list.  A more interesting example is:
  2235.  
  2236.           % : RCS/%,v ; co $<
  2237.  
  2238.  
  2239.  
  2240. Version 3.70                    UW                             35
  2241.  
  2242.  
  2243.  
  2244.  
  2245. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2246.  
  2247.  
  2248.  
  2249.      which describes how to take any target and check it out of
  2250.      the RCS directory if the corresponding file exists in the
  2251.      RCS directory.  The equivalent SCCS rule would be:
  2252.  
  2253.           % : s.% ; get $<
  2254.  
  2255.  
  2256.      The previous RCS example defines an infinite rule, because
  2257.      it says how to make anything from RCS/%,v, and anything also
  2258.      includes RCS/fred.c,v.  To limit the size of the graph that
  2259.      results from such rules dmake uses the macro variable PREP
  2260.      (stands for % repetition).  By default the value of this
  2261.      variable is 0, which says that no repetitions of a %-rule
  2262.      are to be generated.  If it is set to something greater than
  2263.      0, then that many repetitions of any infinite %-rule are
  2264.      allowed.  If in the above example PREP was set to 1, then
  2265.      dmake would generate the dependency graph:
  2266.  
  2267.           % --> RCS/%,v --> RCS/RCS/%,v,v
  2268.  
  2269.      Where each link is assigned the same recipe as the first
  2270.      link.  PREP should be used only in special cases, since it
  2271.      may result in a large increase in the number of possible
  2272.      prerequisites tested.  dmake further assumes that any target
  2273.      that has no suffix can be made from a prerequisite that has
  2274.      at least one suffix.
  2275.  
  2276.      dmake supports dynamic prerequisite generation for prere-
  2277.      quisites of %-meta rules.  This is best illustrated by an
  2278.      example.  The RCS rule shown above can infer how to check
  2279.      out a file from a corresponding RCS file only if the target
  2280.      is a simple file name with no directory information.  That
  2281.      is, the above rule can infer how to find RCS/fred.c,v from
  2282.      the target fred.c, but cannot infer how to find
  2283.      srcdir/RCS/fred.c,v from srcdir/fred.c because the above
  2284.      rule will cause dmake to look for RCS/srcdir/fred.c,v; which
  2285.      does not exist (assume that srcdir has its own RCS directory
  2286.      as is the common case).
  2287.  
  2288.      A more versatile formulation of the above RCS check out rule
  2289.      is the following:
  2290.  
  2291.           % :  $$(@:d)RCS/$$(@:f),v : co $@
  2292.  
  2293.      This rule uses the dynamic macro $@ to specify the prere-
  2294.      quisite to try to infer.  During inference of this rule the
  2295.      macro $@ is set to the value of the target of the %-meta
  2296.      rule and the appropriate prerequisite is generated by
  2297.      extracting the directory portion of the target name (if
  2298.      any), appending the string RCS/ to it, and appending the
  2299.      target file name with a trailing ,v attached to the previous
  2300.      result.
  2301.  
  2302.  
  2303.  
  2304. Version 3.70                    UW                             36
  2305.  
  2306.  
  2307.  
  2308.  
  2309. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2310.  
  2311.  
  2312.  
  2313.      dmake can also infer indirect prerequisites.  An inferred
  2314.      target can have a list of prerequisites added that will not
  2315.      show up in the value of $< but will show up in the value of
  2316.      $? and $&.  Indirect prerequisites are specified in an
  2317.      inference rule by quoting the prerequisite with single
  2318.      quotes.  For example, if you had the explicit dependency:
  2319.  
  2320.           fred.o : fred.c ; rule to make fred.o
  2321.           fred.o : local.h
  2322.  
  2323.      then this can be inferred for fred.o from the following
  2324.      inference rule:
  2325.  
  2326.           %.o : %.c 'local.h' ; rule to make a .o from a .c
  2327.  
  2328.      You may infer indirect prerequisites that are a function of
  2329.      the value of '%' in the current rule.  The meta-rule:
  2330.  
  2331.           %.o : %.c '$(INC)/%.h' ; rule to make a .o from a .c
  2332.  
  2333.      infers an indirect prerequisite found in the INC directory
  2334.      whose name is the same as the expansion of $(INC), and the
  2335.      prerequisite name depends on the base name of the current
  2336.      target.  The set of indirect prerequisites is attached to
  2337.      the meta rule in which they are specified and are inferred
  2338.      only if the rule is used to infer a recipe for a target.
  2339.      They do not play an active role in driving the inference
  2340.      algorithm.  The construct:
  2341.  
  2342.           %.o : %.c %.f 'local.h'; recipe
  2343.  
  2344.      is equivalent to:
  2345.  
  2346.           %.o : %.c 'local.h' : recipe
  2347.           %.o : %.f 'local.h' : recipe
  2348.  
  2349.  
  2350.      If any of the attributes .SETDIR, .EPILOG, .PROLOG, .SILENT,
  2351.      .USESHELL, .SWAP, .PRECIOUS, .LIBRARY, .NOSTATE and .IGNORE
  2352.      are given for a %-rule then when that rule is bound to a
  2353.      target as the result of an inference, the target's set of
  2354.      attributes is augmented by the attributes from the above set
  2355.      that are specified in the bound %-rule.  Other attributes
  2356.      specified for %-meta rules are not inherited by the target.
  2357.      The .SETDIR attribute is treated in a special way.  If the
  2358.      target already had a .SETDIR attribute set then dmake
  2359.      changes to that directory prior to performing the inference.
  2360.      During inference any .SETDIR attributes for the inferred
  2361.      prerequisite are honored.  The directories must exist for a
  2362.      %-meta rule to be selected as a possible inference path.  If
  2363.      the directories do not exist no error message is issued,
  2364.      instead the corresponding path in the inference graph is
  2365.  
  2366.  
  2367.  
  2368. Version 3.70                    UW                             37
  2369.  
  2370.  
  2371.  
  2372.  
  2373. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2374.  
  2375.  
  2376.  
  2377.      rejected.
  2378.  
  2379.      dmake also supports the old format special target
  2380.      .<suffix>.<suffix> by identifying any rules of this form and
  2381.      mapping them to the appropriate %-rule.  So for example if
  2382.      an old makefile contains the construct:
  2383.  
  2384.           .c.o :; cc -c $< -o $@
  2385.  
  2386.      dmake maps this into the following %-rule:
  2387.  
  2388.           %.o : %.c; cc -c $< -o $@
  2389.  
  2390.      Furthermore, dmake understands several SYSV AUGMAKE special
  2391.      targets and maps them into corresponding %-meta rules.
  2392.      These transformation must be enabled by providing the -A
  2393.      flag on the command line or by setting the value of AUGMAKE
  2394.      to non-NULL.  The construct
  2395.  
  2396.           .suff :; recipe
  2397.  
  2398.      gets mapped into:
  2399.  
  2400.           % : %.suff; recipe
  2401.  
  2402.      and the construct
  2403.  
  2404.           .c~.o :; recipe
  2405.  
  2406.      gets mapped into:
  2407.  
  2408.           %.o : s.%.c ; recipe
  2409.  
  2410.      In general, a special target of the form .<str>~ is replaced
  2411.      by the %-rule construct s.%.<str>, thereby providing support
  2412.      for the syntax used by SYSV AUGMAKE for providing SCCS sup-
  2413.      port.  When enabled, these mappings allow processing of
  2414.      existing SYSV makefiles without modifications.
  2415.  
  2416.      dmake bases all of its inferences on the inference graph
  2417.      constructed from the %-rules defined in the makefile.  It
  2418.      knows exactly which targets can be made from which prere-
  2419.      quisites by making queries on the inference graph.  For this
  2420.      reason .SUFFIXES is not needed and is completely ignored.
  2421.  
  2422.      For a %-meta rule to be inferred as the rule whose recipe
  2423.      will be used to make a target, the target's name must match
  2424.      the %-target pattern, and any inferred %-prerequisite must
  2425.      already exist or have an explicit recipe so that the prere-
  2426.      quisite can be made.  Without transitive closure on the
  2427.      inference graph the above rule describes precisely when an
  2428.      inference match terminates the search.  If transitive
  2429.  
  2430.  
  2431.  
  2432. Version 3.70                    UW                             38
  2433.  
  2434.  
  2435.  
  2436.  
  2437. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2438.  
  2439.  
  2440.  
  2441.      closure is enabled (the usual case), and a prerequisite does
  2442.      not exist or cannot be made, then dmake invokes the infer-
  2443.      ence algorithm recursively on the prerequisite to see if
  2444.      there is some way the prerequisite can be manufactured.
  2445.      For, if the prerequisite can be made then the current target
  2446.      can also be made using the current %-meta rule.  This means
  2447.      that there is no longer a need to give a rule for making a
  2448.      .o from a .y if you have already given a rule for making a
  2449.      .o from a .c and a .c from a .y.  In such cases dmake can
  2450.      infer how to make the .o from the .y via the intermediary .c
  2451.      and will remove the .c when the .o is made.  Transitive clo-
  2452.      sure can be disabled by giving the -T switch on the command
  2453.      line.
  2454.  
  2455.      A word of caution.  dmake bases its transitive closure on
  2456.      the %-meta rule targets.  When it performs transitive clo-
  2457.      sure it infers how to make a target from a prerequisite by
  2458.      performing a pattern match as if the potential prerequisite
  2459.      were a new target.  The set of rules:
  2460.  
  2461.           %.o : %.c :; rule for making .o from .c
  2462.           %.c : %.y :; rule for making .c from .y
  2463.           % : RCS/%,v :; check out of RCS file
  2464.  
  2465.      will, by performing transitive closure, allow dmake to infer
  2466.      how to make a .o from a .y using a .c as an intermediate
  2467.      temporary file.  Additionally it will be able to infer how
  2468.      to make a .y from an RCS file, as long as that RCS file is
  2469.      in the RCS directory and has a name which ends in .y,v.  The
  2470.      transitivity computation is performed dynamically for each
  2471.      target that does not have a recipe.  This has potential to
  2472.      be costly if the %-meta rules are not carefully specified.
  2473.      The .NOINFER attribute is used to mark a %-meta node as
  2474.      being a final target during inference.  Any node with this
  2475.      attribute set will not be used for subsequent inferences.
  2476.      As an example the node RCS/%,v is marked as a final node
  2477.      since we know that if the RCS file does not exist there
  2478.      likely is no other way to make it.  Thus the standard
  2479.      startup makefile contains an entry similar to:
  2480.           .NOINFER : RCS/%,v
  2481.      Thereby indicating that the RCS file is the end of the
  2482.      inference chain.
  2483.  
  2484.      Whenever the inference algorithm determines that a target
  2485.      can be made from more than one prerequisite and the infer-
  2486.      ence chains for the two methods are the same length the
  2487.      algorithm reports an ambiguity and prints the ambiguous
  2488.      inference chains.
  2489.  
  2490.      dmake tries to remove intermediate files resulting from
  2491.      transitive closure if the file is not marked as being PRE-
  2492.      CIOUS, or the -u flag was not given on the command line, and
  2493.  
  2494.  
  2495.  
  2496. Version 3.70                    UW                             39
  2497.  
  2498.  
  2499.  
  2500.  
  2501. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2502.  
  2503.  
  2504.  
  2505.      if the inferred intermediate did not previously exist.
  2506.      Intermediate targets that existed prior to being made are
  2507.      never removed.  This is in keeping with the philosophy that
  2508.      dmake should never remove things from the file system that
  2509.      it did not add.  If the special target .REMOVE is defined
  2510.      and has a recipe then dmake constructs a list of the inter-
  2511.      mediate files to be removed and makes them prerequisites of
  2512.      .REMOVE.  It then makes .REMOVE thereby removing the prere-
  2513.      quisites if the recipe of .REMOVE says to.  Typically
  2514.      .REMOVE is defined in the startup file as:
  2515.  
  2516.           .REMOVE :; $(RM) $<
  2517.  
  2518. MAKING TARGETS
  2519.      In order to update a target dmake must execute a recipe.
  2520.      When a recipe needs to be executed it is first expanded so
  2521.      that any macros in the recipe text are expanded, and it is
  2522.      then either executed directly or passed to a shell.  dmake
  2523.      supports two types of recipes.  The regular recipes and
  2524.      group recipes.
  2525.  
  2526.      When a regular recipe is invoked dmake executes each line of
  2527.      the recipe separately using a new copy of a shell if a shell
  2528.      is required.  Thus effects of commands do not generally per-
  2529.      sist across recipe lines.  (e.g. cd requests in a recipe
  2530.      line do not carry over to the next recipe line) The decision
  2531.      on whether a shell is required to execute a command is based
  2532.      on the value of the macro SHELLMETAS or on the specification
  2533.      of '+' or .USESHELL for the current recipe or target respec-
  2534.      tively.  If any character in the value of SHELLMETAS is
  2535.      found in the expanded recipe text-line or the use of a shell
  2536.      is requested explicitly via '+' or .USESHELL then the com-
  2537.      mand is executed using a shell, otherwise the command is
  2538.      executed directly.  The shell that is used for execution is
  2539.      given by the value of the macro SHELL.  The flags that are
  2540.      passed to the shell are given by the value of SHELLFLAGS.
  2541.      Thus dmake constructs the command line:
  2542.  
  2543.           $(SHELL) $(SHELLFLAGS) $(expanded_recipe_command)
  2544.  
  2545.      Normally dmake writes the command line that it is about to
  2546.      invoke to standard output.  If the .SILENT attribute is set
  2547.      for the target or for the recipe line (via @), then the
  2548.      recipe line is not echoed.
  2549.  
  2550.      Group recipe processing is similar to that of regular
  2551.      recipes, except that a shell is always invoked.  The shell
  2552.      that is invoked is given by the value of the macro GROUP-
  2553.      SHELL, and its flags are taken from the value of the macro
  2554.      GROUPFLAGS.  If a target has the .PROLOG attribute set then
  2555.      dmake prepends to the shell script the recipe associated
  2556.      with the special target .GROUPPROLOG, and if the attribute
  2557.  
  2558.  
  2559.  
  2560. Version 3.70                    UW                             40
  2561.  
  2562.  
  2563.  
  2564.  
  2565. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2566.  
  2567.  
  2568.  
  2569.      .EPILOG is set as well, then the recipe associated with the
  2570.      special target .GROUPEPILOG is appended to the script file.
  2571.      This facility can be used to always prepend a common header
  2572.      and common trailer to group recipes.  Group recipes are
  2573.      echoed to standard output just like standard recipes, but
  2574.      are enclosed by lines beginning with [ and ].
  2575.  
  2576.      The recipe flags [+,-,%,@] are recognized at the start of a
  2577.      recipe line even if they appear in a macro.  For example:
  2578.  
  2579.           SH = +
  2580.           all:
  2581.                $(SH)echo hi
  2582.  
  2583.      is completely equivalent to writing
  2584.  
  2585.           SH = +
  2586.           all:
  2587.                +echo hi
  2588.  
  2589.  
  2590.      The last step performed by dmake prior to running a recipe
  2591.      is to set the macro CMNDNAME to the name of the command to
  2592.      execute (determined by finding the first white-space ending
  2593.      token in the command line).  It then sets the macro CMNDARGS
  2594.      to be the remainder of the line.  dmake then expands the
  2595.      macro COMMAND which by default is set to
  2596.  
  2597.           COMMAND = $(CMNDNAME) $(CMNDARGS)
  2598.  
  2599.      The result of this final expansion is the command that will
  2600.      be executed.  The reason for this expansion is to allow for
  2601.      a different interface to the argument passing facilities
  2602.      (esp. under DOS) than that provided by dmake. You can for
  2603.      example define COMMAND to be
  2604.  
  2605.           COMMAND = $(CMNDNAME) @$(mktmp $(CMNDARGS))
  2606.  
  2607.      which dumps the arguments into a temporary file and runs the
  2608.      command
  2609.  
  2610.           $(CMNDNAME) @/tmp/ASAD23043
  2611.  
  2612.      which has a much shorter argument list.  It is now up to the
  2613.      command to use the supplied argument as the source for all
  2614.      other arguments.  As an optimization, if COMMAND is not
  2615.      defined dmake does not perform the above expansion.  On sys-
  2616.      tems, such as UNIX, that handle long command lines this pro-
  2617.      vides a slight saving in processing the makefiles.
  2618.  
  2619.  
  2620.  
  2621.  
  2622.  
  2623.  
  2624. Version 3.70                    UW                             41
  2625.  
  2626.  
  2627.  
  2628.  
  2629. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2630.  
  2631.  
  2632.  
  2633. MAKING LIBRARIES
  2634.      Libraries are easy to maintain using dmake.  A library is a
  2635.      file containing a collection of object files.  Thus to make
  2636.      a library you simply specify it as a target with the
  2637.      .LIBRARY attribute set and specify its list of prere-
  2638.      quisites.  The prerequisites should be the object members
  2639.      that are to go into the library.  When dmake makes the
  2640.      library target it uses the .LIBRARY attribute to pass to the
  2641.      prerequisites the .LIBMEMBER attribute and the name of the
  2642.      library.  This enables the file binding mechanism to look
  2643.      for the member in the library if an appropriate object file
  2644.      cannot be found. A small example best illustrates this.
  2645.  
  2646.           mylib.a .LIBRARY : mem1.o mem2.o mem3.o
  2647.                rules for making library...
  2648.                # remember to remove .o's when lib is made
  2649.  
  2650.           # equivalent to:  '%.o : %.c ; ...'
  2651.           .c.o :; rules for making .o from .c say
  2652.  
  2653.      dmake will use the .c.o rule for making the library members
  2654.      if appropriate .c files can be found using the search rules.
  2655.      NOTE:  this is not specific in any way to C programs, they
  2656.      are simply used as an example.
  2657.  
  2658.      dmake tries to handle the old library construct format in a
  2659.      sensible way.  The construct lib(member.o) is separated and
  2660.      the lib portion is declared as a library target.  The new
  2661.      target is defined with the .LIBRARY attribute set and the
  2662.      member.o portion of the construct is declared as a prere-
  2663.      quisite of the lib target.  If the construct lib(member.o)
  2664.      appears as a prerequisite of a target in the makefile, that
  2665.      target has the new name of the lib assigned as its prere-
  2666.      quisite.  Thus the following example:
  2667.  
  2668.           a.out : ml.a(a.o) ml.a(b.o); $(CC) -o $@  $<
  2669.  
  2670.           .c.o :; $(CC) -c $(CFLAGS) -o $@  $<
  2671.           %.a:
  2672.                ar rv $@ $?
  2673.                ranlib $@
  2674.                rm -rf $?
  2675.  
  2676.      constructs the following dependency graph.
  2677.  
  2678.           a.out : ml.a; $(CC) -o $@  $<
  2679.           ml.a .LIBRARY : a.o b.o
  2680.  
  2681.           %.o : %.c ; $(CC) -c $(CFLAGS) -o $@  $<
  2682.           %.a :
  2683.                ar rv $@ $?
  2684.                ranlib $@
  2685.  
  2686.  
  2687.  
  2688. Version 3.70                    UW                             42
  2689.  
  2690.  
  2691.  
  2692.  
  2693. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2694.  
  2695.  
  2696.  
  2697.                rm -rf $?
  2698.  
  2699.      and making a.out then works as expected.
  2700.  
  2701.      The same thing happens for any target of the form
  2702.      lib((entry)).  These targets have an additional feature in
  2703.      that the entry target has the .SYMBOL attribute set automat-
  2704.      ically.
  2705.  
  2706.      NOTE:  If the notion of entry points is supported by the
  2707.      archive and by dmake (currently not the case) then dmake
  2708.      will search the archive for the entry point and return not
  2709.      only the modification time of the member which defines the
  2710.      entry but also the name of the member file.  This name will
  2711.      then replace entry and will be used for making the member
  2712.      file.  Once bound to an archive member the .SYMBOL attribute
  2713.      is removed from the target.  This feature is presently dis-
  2714.      abled as there is little standardization among archive for-
  2715.      mats, and we have yet to find a makefile utilizing this
  2716.      feature (possibly due to the fact that it is unimplemented
  2717.      in most versions of UNIX Make).
  2718.  
  2719.      Finally, when dmake looks for a library member it must first
  2720.      locate the library file.  It does so by first looking for
  2721.      the library relative to the current directory and if it is
  2722.      not found it then looks relative to the current value of
  2723.      $(TMD).  This allows commonly used libraries to be kept near
  2724.      the root of a source tree and to be easily found by dmake.
  2725.  
  2726. KEEP STATE
  2727.      dmake supports the keeping of state information for targets
  2728.      that it makes whenever the macro .KEEP_STATE is assigned a
  2729.      value.  The value of the macro should be the name of a state
  2730.      file that will contain the state information.  If state
  2731.      keeping is enabled then each target that does not poses the
  2732.      .NOSTATE attribute will have a record written into the state
  2733.      file indicating the target's name, the current directory,
  2734.      the command used to update the target, and which, if any, ::
  2735.      rule is being used.  When you make this target again if any
  2736.      of this information does not match the previous settings and
  2737.      the target is not out dated it will still be re-made.  The
  2738.      assumption is that one of the conditions above has changed
  2739.      and that we wish to remake the target.  For example, state
  2740.      keeping is used in the maintenance of dmake to test compile
  2741.      different versions of the source using different compilers.
  2742.      Changing the compiler causes the compilation flags to be
  2743.      modified and hence all sources to be recompiled.
  2744.  
  2745.      The state file is an ascii file and is portable, however it
  2746.      is not in human readable form as the entries represent hash
  2747.      keys of the above information.
  2748.  
  2749.  
  2750.  
  2751.  
  2752. Version 3.70                    UW                             43
  2753.  
  2754.  
  2755.  
  2756.  
  2757. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2758.  
  2759.  
  2760.  
  2761.      The Sun Microsystem's Make construct
  2762.  
  2763.           .KEEP_STATE :
  2764.  
  2765.      is recognized and is mapped to .KEEP_STATE:=_state.mk.  The
  2766.      dmake version of state keeping does not include scanning C
  2767.      source files for dependencies like Sun Make.  This is
  2768.      specific to C programs and it was felt that it does not
  2769.      belong in make.  dmake instead provides the tool, cdepend,
  2770.      to scan C source files and to produce depedency information.
  2771.      Users are free to modify cdepend to produce other dependency
  2772.      files.  (NOTE: cdepend does not come with the distribution
  2773.      at this time, but will be available in a patch in the near
  2774.      future)
  2775.  
  2776. MULTI PROCESSING
  2777.      If the architecture supports it then dmake is capable of
  2778.      making a target's prerequisites in parallel.  dmake will
  2779.      make as much in parallel as it can and use a number of child
  2780.      processes up to the maximum specified by MAXPROCESS or by
  2781.      the value supplied to the -P command line flag.  A parallel
  2782.      make is enabled by setting the value of MAXPROCESS (either
  2783.      directly or via -P option) to a value which is > 1.  dmake
  2784.      guarantees that all dependencies as specified in the
  2785.      makefile are honored.  A target will not be made until all
  2786.      of its prerequisites have been made.  If a parallel make is
  2787.      being performed then the following restrictions on parallel-
  2788.      ism are enforced.
  2789.  
  2790.           1.   Individual recipe lines in a non-group recipe are
  2791.                performed sequentially in the order in which they
  2792.                are specified within the makefile and in parallel
  2793.                with the recipes of other targets.
  2794.  
  2795.           2.   If a target contains multiple recipe definitions
  2796.                (cf. :: rules) then these are performed sequen-
  2797.                tially in the order in which the :: rules are
  2798.                specified within the makefile and in parallel with
  2799.                the recipes of other targets.
  2800.  
  2801.           3.   If a target rule contains the `!' modifier, then
  2802.                the recipe is performed sequentially for the list
  2803.                of outdated prerequisites and in parallel with the
  2804.                recipes of other targets.
  2805.  
  2806.           4.   If a target has the .SEQUENTIAL attribute set then
  2807.                all of its prerequisites are made sequentially
  2808.                relative to one another (as if MAXPROCESS=1), but
  2809.                in parallel with other targets in the makefile.
  2810.  
  2811.      Note:  If you specify a parallel make then the order of tar-
  2812.      get update and the order in which the associated recipes are
  2813.  
  2814.  
  2815.  
  2816. Version 3.70                    UW                             44
  2817.  
  2818.  
  2819.  
  2820.  
  2821. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2822.  
  2823.  
  2824.  
  2825.      invoked will not correspond to that displayed by the -n
  2826.      flag.
  2827.  
  2828. CONDITIONALS
  2829.      dmake supports a makefile construct called a conditional.
  2830.      It allows the user to conditionally select portions of
  2831.      makefile text for input processing and to discard other por-
  2832.      tions.  This becomes useful for writing makefiles that are
  2833.      intended to function for more than one target host and
  2834.      environment.  The conditional expression is specified as
  2835.      follows:
  2836.  
  2837.           .IF  expression
  2838.              ... if text ...
  2839.           .ELIF  expression
  2840.              ... if text ...
  2841.           .ELSE
  2842.              ... else text ...
  2843.           .END
  2844.  
  2845.      The .ELSE and .ELIF portions are optional, and the condi-
  2846.      tionals may be nested (ie.  the text may contain another
  2847.      conditional).  .IF, .ELSE, and .END may appear anywhere in
  2848.      the makefile, but a single conditional expression may not
  2849.      span multiple makefiles.
  2850.  
  2851.      expression can be one of the following three forms:
  2852.  
  2853.           <text> | <text> == <text> | <text> != <text>
  2854.  
  2855.      where text is either text or a macro expression.  In any
  2856.      case, before the comparison is made, the expression is
  2857.      expanded.  The text portions are then selected and compared.
  2858.      White space at the start and end of the text portion is dis-
  2859.      carded before the comparison.  This means that a macro that
  2860.      evaluates to nothing but white space is considered a NULL
  2861.      value for the purpose of the comparison.  In the first case
  2862.      the expression evaluates TRUE if the text is not NULL other-
  2863.      wise it evaluates FALSE.  The remaining two cases both
  2864.      evaluate the expression on the basis of a string comparison.
  2865.      If a macro expression needs to be equated to a NULL string
  2866.      then compare it to the value of the macro $(NULL).  You can
  2867.      use the $(shell ...) macro to construct more complex test
  2868.      expressions.
  2869.  
  2870. EXAMPLES
  2871.           # A simple example showing how to use make
  2872.           #
  2873.           prgm : a.o b.o
  2874.                cc a.o b.o -o prgm
  2875.           a.o : a.c g.h
  2876.                cc a.c -o $@
  2877.  
  2878.  
  2879.  
  2880. Version 3.70                    UW                             45
  2881.  
  2882.  
  2883.  
  2884.  
  2885. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2886.  
  2887.  
  2888.  
  2889.           b.o : b.c g.h
  2890.                cc b.c -o $@
  2891.  
  2892.      In the previous example prgm is remade only if a.o and/or
  2893.      b.o is out of date with respect to prgm.  These dependencies
  2894.      can be stated more concisely by using the inference rules
  2895.      defined in the standard startup file.  The default rule for
  2896.      making .o's from .c's looks something like this:
  2897.  
  2898.           %.o : %.c; cc -c $(CFLAGS) -o $@ $<
  2899.  
  2900.      Since there exists a rule (defined in the startup file) for
  2901.      making .o's from .c's dmake will use that rule for manufac-
  2902.      turing a .o from a .c and we can specify our dependencies
  2903.      more concisely.
  2904.  
  2905.           prgm : a.o b.o
  2906.                cc -o prgm $<
  2907.           a.o b.o : g.h
  2908.  
  2909.      A more general way to say the above using the new macro
  2910.      expansions would be:
  2911.  
  2912.           SRC = a b
  2913.           OBJ = {$(SRC)}.o
  2914.  
  2915.           prgm : $(OBJ)
  2916.                cc -o $@ $<
  2917.  
  2918.           $(OBJ) : g.h
  2919.  
  2920.      If we want to keep the objects in a separate directory,
  2921.      called objdir, then we would write something like this.
  2922.  
  2923.           SRC = a b
  2924.           OBJ = {$(SRC)}.o
  2925.  
  2926.           prgm : $(OBJ)
  2927.                cc $< -o $@
  2928.  
  2929.           $(OBJ) : g.h
  2930.           %.o : %.c
  2931.                $(CC) -c $(CFLAGS) -o $(@:f) $<
  2932.                mv $(@:f) objdir
  2933.  
  2934.           .SOURCE.o : objdir       # tell make to look here for .o's
  2935.  
  2936.      An example of building library members would go something
  2937.      like this: (NOTE:  The same rules as above will be used to
  2938.      produce .o's from .c's)
  2939.  
  2940.           SRC  = a b
  2941.  
  2942.  
  2943.  
  2944. Version 3.70                    UW                             46
  2945.  
  2946.  
  2947.  
  2948.  
  2949. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  2950.  
  2951.  
  2952.  
  2953.           LIB  = lib
  2954.           LIBm = { $(SRC) }.o
  2955.  
  2956.           prgm: $(LIB)
  2957.                cc -o $@ $(LIB)
  2958.  
  2959.           $(LIB) .LIBRARY : $(LIBm)
  2960.                ar rv $@ $<
  2961.                rm $<
  2962.  
  2963.      Finally, suppose that each of the source files in the previ-
  2964.      ous example had the `:' character in their target name.
  2965.      Then we would write the above example as:
  2966.  
  2967.           SRC  = f:a f:b
  2968.           LIB  = lib
  2969.           LIBm = "{ $(SRC) }.o"         # put quotes around each token
  2970.  
  2971.           prgm: $(LIB)
  2972.                cc -o $@ $(LIB)
  2973.  
  2974.           $(LIB) .LIBRARY : $(LIBm)
  2975.                ar rv $@ $<
  2976.                rm $<
  2977.  
  2978. COMPATIBILITY
  2979.      There are two notable differences between dmake and the
  2980.      standard version of BSD UNIX 4.2/4.3 Make.
  2981.  
  2982.           1. BSD UNIX 4.2/4.3 Make supports wild card filename
  2983.              expansion for prerequisite names.  Thus if a direc-
  2984.              tory contains a.h, b.h and c.h, then a line like
  2985.  
  2986.                   target: *.h
  2987.  
  2988.              will cause UNIX make to expand the *.h into "a.h b.h
  2989.              c.h".  dmake does not support this type of filename
  2990.              expansion.
  2991.  
  2992.           2. Unlike UNIX make, touching a library member causes
  2993.              dmake to search the library for the member name and
  2994.              to update the library time stamp.  This is only
  2995.              implemented in the UNIX version.  MSDOS and other
  2996.              versions may not have librarians that keep file time
  2997.              stamps, as a result dmake touches the library file
  2998.              itself, and prints a warning.
  2999.  
  3000.      dmake is not compatible with GNU Make.  In particular it
  3001.      does not understand GNU Make's macro expansions that query
  3002.      the file system.
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008. Version 3.70                    UW                             47
  3009.  
  3010.  
  3011.  
  3012.  
  3013. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  3014.  
  3015.  
  3016.  
  3017.      dmake is fully compatible with SYSV AUGMAKE, and supports
  3018.      the following AUGMAKE features:
  3019.  
  3020.           1. The word include appearing at the start of a line
  3021.              can be used instead of the ".INCLUDE :" construct
  3022.              understood by dmake.
  3023.  
  3024.           2. The macro modifier expression $(macro:str=sub) is
  3025.              understood and is equivalent to the expression
  3026.              $(macro:s/str/sub), with the restriction that str
  3027.              must match the following regular expression:
  3028.  
  3029.                   str[ |\t][ |\t]*
  3030.  
  3031.              (ie. str only matches at the end of a token where
  3032.              str is a suffix and is terminated by a space, a tab,
  3033.              or end of line) Normally sub is expanded before the
  3034.              substitution is made, if you specify -A on the com-
  3035.              mand line then sub is not expanded.
  3036.  
  3037.           3. The macro % is defined to be $@ (ie. $% expands to
  3038.              the same value as $@).
  3039.  
  3040.           4. The AUGMAKE notion of libraries is handled
  3041.              correctly.
  3042.  
  3043.           5. When defining special targets for the inference
  3044.              rules and the AUGMAKE special target handling is
  3045.              enabled then the special target .X is equivalent to
  3046.              the %-rule "% : %.X".
  3047.  
  3048.           6. Directories are always made if you specify -A.  This
  3049.              is consistent with other UNIX versions of Make.
  3050.  
  3051.           7. Makefiles that utilize virtual targets to force mak-
  3052.              ing of other targets work as expected if AUGMAKE
  3053.              special target handling is enabled.  For example:
  3054.  
  3055.                   FRC:
  3056.                   myprog.o : myprog.c $(FRC) ; ...
  3057.  
  3058.              Works as expected if you issue the command
  3059.  
  3060.                   'dmake -A FRC=FRC'
  3061.  
  3062.              but fails with a 'don't know how to make FRC' error
  3063.              message if you do not specify AUGMAKE special target
  3064.              handling via the -A flag (or by setting AUGMAKE:=yes
  3065.              internally).
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072. Version 3.70                    UW                             48
  3073.  
  3074.  
  3075.  
  3076.  
  3077. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  3078.  
  3079.  
  3080.  
  3081. LIMITS
  3082.      In some environments the length of an argument string is
  3083.      restricted.  (e.g. MSDOS command line arguments cannot be
  3084.      longer than 128 bytes if you are using the standard
  3085.      command.com command interpreter as your shell, dmake text
  3086.      diversions may help in these situations.)
  3087.  
  3088. PORTABILITY
  3089.      To write makefiles that can be moved from one environment to
  3090.      another requires some forethought.  In particular you must
  3091.      define as macros all those things that may be different in
  3092.      the new environment.  dmake has two facilities that help to
  3093.      support writing portable makefiles, recursive macros and
  3094.      conditional expressions.  The recursive macros, allow one to
  3095.      define environment configurations that allow different
  3096.      environments for similar types of operating systems.  For
  3097.      example the same make script can be used for SYSV and BSD
  3098.      but with different macro definitions.
  3099.  
  3100.      To write a makefile that is portable between UNIX and MSDOS
  3101.      requires both features since in almost all cases you will
  3102.      need to define new recipes for making targets.  The recipes
  3103.      will probably be quite different since the capabilities of
  3104.      the tools on each machine are different.  Different macros
  3105.      will be needed to help handle the smaller differences in the
  3106.      two environments.
  3107.  
  3108. FILES
  3109.      Makefile, makefile, startup.mk (use dmake -V to tell you
  3110.      where the startup file is)
  3111.  
  3112. SEE ALSO
  3113.      sh(1), csh(1), touch(1), f77(1), pc(1), cc(1)
  3114.      S.I. Feldman  Make - A Program for Maintaining Computer Pro-
  3115.      grams
  3116.  
  3117. AUTHOR
  3118.      Dennis Vadura, CS Dept. University of Waterloo.
  3119.      dvadura@watdragon.uwaterloo.ca
  3120.      Many thanks to Carl Seger for his helpful suggestions, and
  3121.      to Trevor John Thompson for his many excellent ideas and
  3122.      informative bug reports.
  3123.  
  3124. BUGS
  3125.      Some system commands return non-zero status inappropriately.
  3126.      Use -i (`-' within the makefile) to overcome the difficulty.
  3127.  
  3128.      Some systems do not have easily accessible time stamps for
  3129.      library members (MSDOS, AMIGA, etc) for these dmake uses the
  3130.      time stamp of the library instead and prints a warning the
  3131.      first time it does so.  This is almost always ok, except
  3132.      when multiple makefiles update a single library file.  In
  3133.  
  3134.  
  3135.  
  3136. Version 3.70                    UW                             49
  3137.  
  3138.  
  3139.  
  3140.  
  3141. DMAKE(p)             Unsupported Free Software            DMAKE(p)
  3142.  
  3143.  
  3144.  
  3145.      these instances it is possible to miss an update if one is
  3146.      not careful.
  3147.  
  3148.      This man page is way too long.
  3149.  
  3150. WARNINGS
  3151.      Rules supported by make(1) may not work if transitive clo-
  3152.      sure is turned off (-T, .NOINFER).
  3153.  
  3154.      PWD from csh/ksh will cause problems if a cd operation is
  3155.      performed and -e or -E option is used.
  3156.  
  3157.      Using internal macros such as COMMAND, may wreak havoc if
  3158.      you don't understand their functionality.
  3159.  
  3160.      If multiple MACRO=line arguments appear on the command line,
  3161.      only the first is used.  Beware of this in conjunction with
  3162.      the MAKEMACROS variable.
  3163.  
  3164.  
  3165.  
  3166.  
  3167.  
  3168.  
  3169.  
  3170.  
  3171.  
  3172.  
  3173.  
  3174.  
  3175.  
  3176.  
  3177.  
  3178.  
  3179.  
  3180.  
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.  
  3187.  
  3188.  
  3189.  
  3190.  
  3191.  
  3192.  
  3193.  
  3194.  
  3195.  
  3196.  
  3197.  
  3198.  
  3199.  
  3200. Version 3.70                    UW                             50
  3201.